Fix some internal links #152
Workflow file for this run
This file contains 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: Test | |
on: pull_request | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies with pip | |
run: pip install --no-warn-script-location --user -r requirements.txt -c constraints.txt | |
- name: Test doc8 | |
run: make test | |
lint: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies with pip | |
run: pip install --no-warn-script-location --user -r requirements.txt -c constraints.txt | |
- name: Lint | |
run: make lint | |
build: | |
needs: [test, lint] | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Setup Graphviz | |
uses: ts-graphviz/setup-graphviz@v2 | |
- name: Install dependencies with pip | |
run: pip install --no-warn-script-location --user -r requirements.txt -c constraints.txt | |
- name: Build the docs | |
run: make html | |
- name: Upload document artifacts | |
uses: actions/upload-artifact@v4 | |
id: artifact-upload-step | |
with: | |
name: html-artifacts-${{ github.event.pull_request.number }} | |
path: build/html | |
retention-days: 30 # default 90 | |
compression-level: 9 # maximum compression, default 6 | |
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` | |
- name: Find HTML artifacts link comment | |
uses: peter-evans/find-comment@v3 | |
id: find-comment | |
# Skip if PR from fork | |
if: github.repository == github.event.pull_request.head.repo.full_name | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-author: 'github-actions[bot]' | |
body-includes: "HTML artifacts:" | |
- name: Create or update HTML artifacts link comment | |
uses: peter-evans/create-or-update-comment@v4 | |
# Skip if PR from fork | |
if: github.repository == github.event.pull_request.head.repo.full_name | |
with: | |
comment-id: ${{ steps.find-comment.outputs.comment-id }} | |
issue-number: ${{ github.event.pull_request.number }} | |
body: | | |
HTML artifacts: ${{ steps.artifact-upload-step.outputs.artifact-url }}. | |
To view the resulting site: | |
1. Click on the above link to download the artifacts archive | |
2. Extract it | |
3. Open `html-artifacts-${{ github.event.pull_request.number }}/index.html` in your favorite browser | |
edit-mode: replace |