35 lines
955 B
YAML
35 lines
955 B
YAML
name: Continuous Integration
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
CI_COMMIT_MESSAGE: Continuous Integration update docs
|
|
CI_COMMIT_AUTHOR: Continuous Integration
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- run: apt update -y
|
|
- run: apt install python3-pip -y
|
|
- run: pip3 install mkdocs-material
|
|
|
|
- run: mkdocs build
|
|
|
|
# Commit and push all changed files.
|
|
- run: |
|
|
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
|
|
git config --global user.email "username@users.noreply.github.com"
|
|
- run: git subtree add --prefix pages origin/pages
|
|
- run: git subtree pull --prefix=pages origin pages
|
|
- run: |
|
|
rm -rf pages/*
|
|
cp -r site/* pages/
|
|
- run: |
|
|
git add pages/
|
|
git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
|
|
- run: git subtree push --prefix pages origin pages
|