2022-09-08 08:40:58 +02:00
|
|
|
---
|
2021-07-24 03:12:35 +02:00
|
|
|
name: GitHub Pages
|
|
|
|
|
2022-04-28 05:45:48 +02:00
|
|
|
"on":
|
2021-07-24 03:12:35 +02:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
2022-04-28 05:45:48 +02:00
|
|
|
|
2021-07-24 03:12:35 +02:00
|
|
|
jobs:
|
2022-04-27 05:02:54 +02:00
|
|
|
deploy_book:
|
2021-07-24 03:12:35 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
steps:
|
2022-04-28 05:45:48 +02:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
clean: false
|
2021-07-24 03:12:35 +02:00
|
|
|
|
|
|
|
- name: Install deps
|
2022-04-27 05:02:54 +02:00
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y clang build-essential \
|
|
|
|
librust-openssl-dev libssl-dev \
|
|
|
|
libsqlite3-dev libudev-dev \
|
|
|
|
libpam0g-dev
|
2021-07-24 03:12:35 +02:00
|
|
|
|
|
|
|
- name: Setup mdBook
|
|
|
|
uses: peaceiris/actions-mdbook@v1
|
|
|
|
with:
|
|
|
|
mdbook-version: 'latest'
|
|
|
|
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
|
|
|
|
- uses: actions-rs/cargo@v1
|
2022-07-07 05:03:08 +02:00
|
|
|
with:
|
|
|
|
command: install
|
|
|
|
args: mdbook-template
|
2021-07-24 03:12:35 +02:00
|
|
|
|
2022-04-28 05:45:48 +02:00
|
|
|
- name: Make all the books
|
|
|
|
run: |
|
|
|
|
export
|
|
|
|
./build_all_the_docs.sh
|
2021-07-24 03:12:35 +02:00
|
|
|
|
2022-09-08 08:40:58 +02:00
|
|
|
- name: Install python 3.10
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: '3.10'
|
2022-08-17 13:35:06 +02:00
|
|
|
- name: pykanidm docs
|
|
|
|
run: |
|
|
|
|
python -m pip install poetry
|
|
|
|
make docs/pykanidm/build
|
|
|
|
mv pykanidm/site ./docs/pykanidm
|
|
|
|
|
2021-07-24 03:12:35 +02:00
|
|
|
- name: Deploy
|
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
2022-10-07 11:03:25 +02:00
|
|
|
if: ${{ github.ref == 'refs/heads/master' }}
|
2021-07-24 03:12:35 +02:00
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
publish_dir: ./docs
|
2021-07-24 07:00:08 +02:00
|
|
|
destination_dir: ./docs
|