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:
|
|
|
|
|
2022-11-13 23:57:05 +01:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
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
|
|
|
|
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
|
|
|
|
2022-12-26 23:52:03 +01:00
|
|
|
- name: Setup deno
|
2023-01-10 04:50:53 +01:00
|
|
|
# Documentation: https://github.com/denoland/setup-deno
|
|
|
|
uses: denoland/setup-deno@v1
|
2022-12-26 23:52:03 +01:00
|
|
|
with:
|
|
|
|
deno-version: v1.x
|
|
|
|
|
|
|
|
- name: Test document formatting
|
|
|
|
run: |
|
2023-01-24 00:38:19 +01:00
|
|
|
make doc/format
|
2022-12-26 23:52:03 +01:00
|
|
|
|
2021-07-24 03:12:35 +02:00
|
|
|
- name: Setup mdBook
|
|
|
|
uses: peaceiris/actions-mdbook@v1
|
|
|
|
with:
|
2022-12-26 23:52:03 +01:00
|
|
|
mdbook-version: "latest"
|
2021-07-24 03:12:35 +02:00
|
|
|
|
|
|
|
- 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
|
2023-03-02 03:47:23 +01:00
|
|
|
run: ./scripts/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:
|
2022-12-26 23:52:03 +01:00
|
|
|
python-version: "3.10"
|
2023-01-10 04:50:53 +01:00
|
|
|
|
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
|