Skip to content

Commit c3aa79f

Browse files
authored
Merge pull request #35 from cgay/dev
automation: deploy docs to dylan-lang.github.io
2 parents c1ef039 + 5a2a8dc commit c3aa79f

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Deploy documentation
2+
3+
on:
4+
push:
5+
# all branches
6+
paths:
7+
- 'documentation/**'
8+
pull_request:
9+
paths:
10+
- 'documentation/**'
11+
12+
# This enables the Run Workflow button on the Actions tab.
13+
workflow_dispatch:
14+
15+
# https://github.com/JamesIves/github-pages-deploy-action#readme
16+
permissions:
17+
contents: write
18+
19+
# Set DYLAN environment variable to GITHUB_WORKSPACE so packages are
20+
# installed in ../../_packages relative to documentation's Makefile
21+
env:
22+
DYLAN: ${{ github.workspace }}
23+
24+
jobs:
25+
26+
build-and-deploy:
27+
runs-on: ubuntu-latest
28+
steps:
29+
30+
- name: Checkout code
31+
uses: actions/checkout@v4
32+
33+
- name: Check links
34+
uses: addnab/docker-run-action@v3
35+
with:
36+
image: ghcr.io/fraya/dylan-docs
37+
options: -v ${{ github.workspace }}/documentation:/docs
38+
run: make linkcheck
39+
40+
- name: Build docs
41+
uses: addnab/docker-run-action@v3
42+
with:
43+
image: ghcr.io/fraya/dylan-docs
44+
options: -v ${{ github.workspace }}/documentation:/docs
45+
run: make html
46+
47+
- name: Upload HTML
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: lsp-dylan
51+
path: documentation/build/html/
52+
53+
- name: Bypass Jekyll on GH Pages
54+
run: sudo touch documentation/build/html/.nojekyll
55+
56+
- name: Deploy to GitHub Pages
57+
uses: JamesIves/github-pages-deploy-action@v4
58+
with:
59+
folder: documentation/build/html

documentation/source/conf.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,12 @@
5656
# relative to this directory. They are copied after the builtin static files,
5757
# so a file named "default.css" will overwrite the builtin "default.css".
5858
html_static_path = ['_static']
59+
60+
61+
# Ignore GitHub source code links with line number anchors in them because
62+
# they're apparently handled via Javascript and won't be found in the HTML.
63+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-linkcheck_anchors_ignore
64+
linkcheck_anchors_ignore = [r"^L\d+$"]
65+
66+
# Ignore certificate verification
67+
tls_verify = False

0 commit comments

Comments
 (0)