Skip to content

Commit

Permalink
automation: deploy docs to dylan-lang.github.io
Browse files Browse the repository at this point in the history
  • Loading branch information
cgay committed Apr 21, 2024
1 parent c1ef039 commit c0059d9
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 1 deletion.
55 changes: 55 additions & 0 deletions .github/workflows/build-and-deploy-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build and deploy documentation

on:
push:
# all branches
pull_request:

# This enables the Run Workflow button on the Actions tab.
workflow_dispatch:

# https://github.com/JamesIves/github-pages-deploy-action#readme
permissions:
contents: write

# Set DYLAN environment variable to GITHUB_WORKSPACE so packages are
# installed in ../../_packages relative to documentation's Makefile
env:
DYLAN: ${{ github.workspace }}

jobs:

build-and-deploy:
runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Check links
uses: addnab/docker-run-action@v3
with:
image: ghcr.io/fraya/dylan-docs
options: -v ${{ github.workspace }}/documentation:/docs
run: make linkcheck

- name: Build docs
uses: addnab/docker-run-action@v3
with:
image: ghcr.io/fraya/dylan-docs
options: -v ${{ github.workspace }}/documentation:/docs
run: make html

- name: Upload html
uses: actions/upload-artifact@v4
with:
name: lsp-dylan
path: documentation/build/html/

- name: Bypass Jekyll on GH Pages
run: sudo touch documentation/build/html/.nojekyll

- name: Deploy docs
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: documentation/build/html
2 changes: 1 addition & 1 deletion documentation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
9 changes: 9 additions & 0 deletions documentation/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,12 @@
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']


# Ignore GitHub source code links with line number anchors in them because
# they're apparently handled via Javascript and won't be found in the HTML.
# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-linkcheck_anchors_ignore
linkcheck_anchors_ignore = [r"^L\d+$"]

# Ignore certification verification
tls_verify = False

0 comments on commit c0059d9

Please sign in to comment.