2019-12-30 08:55:40 +03:00
|
|
|
name: pages
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2021-10-02 15:26:22 +03:00
|
|
|
- main
|
2021-02-07 20:59:10 +03:00
|
|
|
paths:
|
2021-10-02 15:26:22 +03:00
|
|
|
- "docs/**"
|
|
|
|
- "ci/build-docs.sh"
|
|
|
|
- "ci/generate-docs.py"
|
|
|
|
- "ci/subst-release-info.py"
|
|
|
|
- ".github/workflows/pages.yml"
|
2019-12-30 09:22:14 +03:00
|
|
|
schedule:
|
|
|
|
- cron: "50 * * * *"
|
|
|
|
|
2023-02-26 03:49:57 +03:00
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
pages: write
|
|
|
|
id-token: write
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: "pages"
|
|
|
|
|
2019-12-30 08:55:40 +03:00
|
|
|
jobs:
|
2023-02-26 03:49:57 +03:00
|
|
|
build:
|
2019-12-30 08:55:40 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-04-11 04:34:51 +03:00
|
|
|
uses: actions/checkout@v3
|
2022-10-01 16:31:35 +03:00
|
|
|
- name: "Install Rust"
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: "minimal"
|
2023-01-24 05:06:35 +03:00
|
|
|
toolchain: "stable"
|
2022-10-01 17:12:23 +03:00
|
|
|
default: true
|
2022-10-01 16:31:35 +03:00
|
|
|
override: true
|
|
|
|
components: "rustfmt"
|
|
|
|
env:
|
|
|
|
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
2022-07-18 11:59:56 +03:00
|
|
|
- name: Install gelatyx
|
2023-03-16 05:22:51 +03:00
|
|
|
uses: baptiste0928/cargo-install@v1
|
|
|
|
with:
|
|
|
|
crate: gelatyx
|
|
|
|
args: --locked
|
|
|
|
- name: Install mdbook-linkcheck
|
|
|
|
uses: baptiste0928/cargo-install@v1
|
|
|
|
with:
|
|
|
|
crate: mdbook-linkcheck
|
|
|
|
args: --locked
|
|
|
|
- uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: 3.x
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
key: ${{ github.ref }}
|
|
|
|
path: .cache
|
2019-12-30 08:55:40 +03:00
|
|
|
- name: Build
|
2022-12-22 20:52:42 +03:00
|
|
|
env:
|
2022-12-27 20:10:05 +03:00
|
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2019-12-30 09:37:06 +03:00
|
|
|
run: |
|
|
|
|
source $HOME/.cargo/env
|
2023-03-16 05:22:51 +03:00
|
|
|
CARDS=true ./ci/build-docs.sh
|
2023-02-26 03:49:57 +03:00
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-pages-artifact@v1
|
2019-12-30 08:55:40 +03:00
|
|
|
with:
|
2023-03-16 05:22:51 +03:00
|
|
|
path: gh_pages
|
2023-02-26 03:49:57 +03:00
|
|
|
|
|
|
|
deploy:
|
|
|
|
environment:
|
|
|
|
name: github-pages
|
|
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build
|
|
|
|
steps:
|
|
|
|
- name: Deploy
|
|
|
|
id: deployment
|
2023-03-20 05:10:59 +03:00
|
|
|
uses: actions/deploy-pages@v2
|