Skip to content

Commit 150bd31

Browse files
authored
Deploy the website even if linkcheck fails (#4189)
* Deploy the website even if linkcheck fails
1 parent a5e5c93 commit 150bd31

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

.github/workflows/docs.yml

+16-3
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@ jobs:
2121
runs-on: ubuntu-latest
2222
container:
2323
image: firedrakeproject/firedrake-docdeps:latest
24+
outputs:
25+
conclusion: ${{ steps.report.outputs.conclusion }}
2426
steps:
2527
- uses: actions/checkout@v4
2628
with:
2729
path: firedrake-repo
2830

2931
- name: Install Firedrake
32+
id: install
3033
run: |
3134
: # Pass '--system-site-packages' so already installed packages can be found
3235
python3 -m venv --system-site-packages venv
@@ -40,12 +43,13 @@ jobs:
4043
make -C firedrake-repo/docs validate-bibtex
4144
4245
- name: Check documentation links
43-
if: github.ref == 'refs/heads/master'
4446
run: |
4547
. venv/bin/activate
4648
make -C firedrake-repo/docs linkcheck
4749
4850
- name: Build docs
51+
id: build
52+
if: success() || steps.install.conclusion == 'success'
4953
run: |
5054
. venv/bin/activate
5155
cd firedrake-repo/docs
@@ -54,21 +58,31 @@ jobs:
5458
make latexpdf
5559
5660
- name: Copy manual to HTML tree
61+
id: copy
62+
if: success() || steps.build.conclusion == 'success'
5763
run: |
5864
cd firedrake-repo/docs
5965
cp build/latex/Firedrake.pdf build/html/_static/manual.pdf
6066
6167
- name: Upload artifact
68+
id: upload
69+
if: success() || steps.copy.conclusion == 'success'
6270
uses: actions/upload-pages-artifact@v3
6371
with:
6472
name: github-pages
6573
path: /__w/firedrake/firedrake/firedrake-repo/docs/build/html
6674
retention-days: 1
6775

76+
- name: Report status
77+
id: report
78+
if: success() || steps.upload.conclusion == 'success'
79+
run: echo "conclusion=success" >> "$GITHUB_OUTPUT"
80+
6881
deploy:
6982
name: Deploy Github pages
7083
needs: build_docs
71-
if: github.ref == 'refs/heads/master'
84+
# Always run this workflow on master, even if linkcheck fails
85+
if: always() && github.ref == 'refs/heads/master' && needs.build_docs.outputs.conclusion == 'success'
7286
permissions:
7387
pages: write
7488
id-token: write
@@ -78,5 +92,4 @@ jobs:
7892
runs-on: ubuntu-latest
7993
steps:
8094
- name: Deploy to GitHub Pages
81-
id: deployment
8295
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)