2021-05-04 01:42:52 +02:00
|
|
|
name: Deploy documentation
|
|
|
|
on:
|
2021-08-21 15:00:14 +02:00
|
|
|
workflow_dispatch:
|
2022-11-24 09:05:36 +01:00
|
|
|
# runs every monday at midnight
|
|
|
|
schedule:
|
|
|
|
- cron: "0 0 * * 1"
|
2021-05-04 01:42:52 +02:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
docs:
|
|
|
|
name: Build and Deploy
|
2022-11-24 09:05:36 +01:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: ["ubuntu-latest"]
|
2022-12-20 17:11:35 +01:00
|
|
|
php: ["8.2"]
|
2023-11-24 12:52:33 +01:00
|
|
|
clang: ["17"]
|
2022-11-24 09:05:36 +01:00
|
|
|
mdbook: ["latest"]
|
2021-05-04 01:42:52 +02:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2022-09-10 02:25:59 +02:00
|
|
|
uses: actions/checkout@v3
|
2021-05-04 01:42:52 +02:00
|
|
|
- name: Setup PHP
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
2022-11-24 09:05:36 +01:00
|
|
|
php-version: ${{ matrix.php }}
|
2021-05-04 01:42:52 +02:00
|
|
|
- name: Setup Rust
|
2022-11-24 09:05:36 +01:00
|
|
|
uses: dtolnay/rust-toolchain@nightly
|
|
|
|
- name: Cache LLVM and Clang
|
|
|
|
id: cache-llvm
|
|
|
|
uses: actions/cache@v3
|
2021-05-04 01:42:52 +02:00
|
|
|
with:
|
2022-11-24 09:05:36 +01:00
|
|
|
path: ${{ runner.temp }}/llvm-${{ matrix.clang }}
|
|
|
|
key: ${{ matrix.os }}-llvm-${{ matrix.clang }}
|
2021-05-04 01:42:52 +02:00
|
|
|
- name: Setup LLVM & Clang
|
|
|
|
uses: KyleMayes/install-llvm-action@v1
|
|
|
|
with:
|
2022-11-24 09:05:36 +01:00
|
|
|
version: ${{ matrix.clang }}
|
|
|
|
directory: ${{ runner.temp }}/llvm-${{ matrix.clang }}
|
|
|
|
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
|
2021-08-21 15:00:14 +02:00
|
|
|
- name: Install mdbook
|
2021-08-21 15:24:51 +02:00
|
|
|
uses: peaceiris/actions-mdbook@v1
|
2021-08-21 15:00:14 +02:00
|
|
|
with:
|
2022-11-24 09:05:36 +01:00
|
|
|
mdbook-version: ${{ matrix.mdbook }}
|
2021-08-21 15:00:14 +02:00
|
|
|
- name: Build guide
|
2021-09-05 08:46:38 +02:00
|
|
|
run: mdbook build guide
|
2021-05-04 01:42:52 +02:00
|
|
|
- name: Publish docs
|
|
|
|
uses: JamesIves/github-pages-deploy-action@3.7.1
|
|
|
|
with:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
BRANCH: gh-pages
|
2021-09-05 08:46:38 +02:00
|
|
|
FOLDER: guide/book
|
2022-09-10 02:25:59 +02:00
|
|
|
CLEAN: true
|