Skip to content

docs: fix button link url syntax #1807

docs: fix button link url syntax

docs: fix button link url syntax #1807

Workflow file for this run

name: build-test-deploy-book
# Only build PRs, the main branch, and releases. Pushes to branches will only
# be built when a PR is opened. This avoids duplicated builds in PRs coming
# from branches in the origin repository (1 for PR and 1 for push).
# This came from Leo's work with fatiando
on:
pull_request:
push:
branches:
- main
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Build and test the book, then deploy from a separate job.
jobs:
build-test-book:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch_depth: 0
- name: Restore mtimes from git history
run: |
sudo apt-get install git-restore-mtime
git restore-mtime
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.13"
- name: Upgrade pip
run: |
# install pip=>20.1 to use "pip cache dir"
python3 -m pip install --upgrade pip
- name: Get pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"
- name: Cache dependencies
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae #v5.0.5
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: python3 -m pip install nox
- name: Build book
run: nox -s docs-test
- name: Setup Pages
id: pages
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d #v6
# Save html as artifact
- name: Save book html as artifact for viewing
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: book-html
path: |
_build/html/
- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b #v4
with:
path: ./_build/html
# Test for bad links and ensure alt tags for usability
- name: Check HTML using htmlproofer
continue-on-error: true
uses: chabad360/htmlproofer@master
with:
directory: "_build/html"
arguments: |
--ignore-files "/.+\/_static\/.+/,/genindex.html/"
--ignore-status-codes "0, 200, 401, 403, 429, 503"
deploy:
if: github.ref == 'refs/heads/main'
needs: build-test-book
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 #v5.0.0