Skip to content

Commit

Permalink
Merge pull request #35 from cgay/dev
Browse files Browse the repository at this point in the history
automation: deploy docs to dylan-lang.github.io
  • Loading branch information
cgay authored Apr 21, 2024
2 parents c1ef039 + 5a2a8dc commit c3aa79f
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Deploy documentation

on:
push:
# all branches
paths:
- 'documentation/**'
pull_request:
paths:
- 'documentation/**'

# 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 to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: documentation/build/html
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 certificate verification
tls_verify = False

0 comments on commit c3aa79f

Please sign in to comment.