Emscripten test #14
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: gh-pages | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
release: | |
types: [published] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
guide-build: | |
runs-on: ubuntu-latest | |
outputs: | |
tag_name: ${{ steps.prepare_tag.outputs.tag_name }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
- uses: dtolnay/rust-toolchain@nightly | |
- name: Setup mdBook | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: mdbook,mdbook-tabs | |
- name: Link Checker | |
id: lychee | |
uses: lycheeverse/lychee-action@v2 | |
with: | |
# setup lychee but don't run it for now | |
args: --version | |
lycheeVersion: nightly | |
- name: Prepare tag | |
id: prepare_tag | |
run: | | |
TAG_NAME="${GITHUB_REF##*/}" | |
echo "::set-output name=tag_name::${TAG_NAME}" | |
# This builds the book in target/guide/. | |
- name: Build the guide | |
run: | | |
python -m pip install --upgrade pip && pip install nox | |
nox -s ${{ github.event_name == 'release' && 'build-guide' || 'check-guide' }} | |
env: | |
PYO3_VERSION_TAG: ${{ steps.prepare_tag.outputs.tag_name }} | |
# allows lychee to get better rate limits from github | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Deploy docs and the guide | |
if: ${{ github.event_name == 'release' }} | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./target/guide/ | |
destination_dir: ${{ steps.prepare_tag.outputs.tag_name }} | |
full_commit_message: "Upload documentation for ${{ steps.prepare_tag.outputs.tag_name }}" |