2024-01-18 14:05:45 +01:00
|
|
|
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
|
2024-01-19 13:27:08 +01:00
|
|
|
with:
|
|
|
|
path: ./static
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
ref: pages
|
|
|
|
path: ./pages
|
2024-01-18 14:05:45 +01:00
|
|
|
|
2024-01-18 15:15:14 +01:00
|
|
|
- run: apt update -y
|
2024-01-18 15:18:12 +01:00
|
|
|
- run: apt install python3 python3-pip -y
|
2024-01-18 15:15:14 +01:00
|
|
|
- run: pip3 install mkdocs-material
|
2024-01-18 14:05:45 +01:00
|
|
|
|
|
|
|
- run: mkdocs build
|
2024-01-19 13:27:08 +01:00
|
|
|
working-directory: ./static
|
2024-01-18 14:05:45 +01:00
|
|
|
|
2024-01-18 15:13:21 +01:00
|
|
|
- run: |
|
2024-01-19 13:27:08 +01:00
|
|
|
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
|
|
|
|
git config --global user.email "me+ci@xeovalyte.dev"
|
2024-01-19 12:23:35 +01:00
|
|
|
- run: |
|
2024-01-19 13:27:08 +01:00
|
|
|
rm pages/* -r
|
|
|
|
cp static/site/* pages/ -r
|
2024-01-18 15:13:21 +01:00
|
|
|
- run: |
|
2024-01-19 12:20:37 +01:00
|
|
|
git add .
|
2024-01-18 14:05:45 +01:00
|
|
|
git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
|
2024-01-19 13:06:32 +01:00
|
|
|
git push
|
2024-01-19 13:27:08 +01:00
|
|
|
working-directory: ./pages
|
2024-01-19 11:43:39 +01:00
|
|
|
- run: curl https://docs.xeovalyte.dev/update/static
|