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"]
|
|
|
|
php: ["8.0"]
|
|
|
|
clang: ["14"]
|
|
|
|
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
|