Skip to content

[init]

[init] #22

Workflow file for this run

name: Documentation
on:
push:
branches:
- main
paths:
- docs/**
- .github/workflows/documentation.yml
jobs:
build-doc:
name: Build documentation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@main
with:
repository: "NaokiHori/SpectralNSSolver1"
ref: ${{ github.ref_name }}
- name: Check dead links
run: |
docker run \
--rm \
--volume ${PWD}:/project \
--workdir /project \
sphinxdoc/sphinx:latest \
sphinx-build -M linkcheck "docs/source" "docs/build"
log=docs/build/linkcheck/output.txt
if [ -e ${log} ]; then
wc -l ${log}
cat ${log}
fi
- name: Build documentation using Sphinx
run: |
docker run \
--rm \
--volume ${PWD}:/project \
--workdir /project \
sphinxdoc/sphinx:latest \
sphinx-build -M html "docs/source" "docs/build"
- name: Upload HTML artifacts
uses: actions/upload-artifact@v3
with:
name: DocHTML
path: docs/build/html
deploy-doc:
name: Deploy documentation
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: [build-doc]
steps:
- name: Download HTML artifacts
uses: actions/download-artifact@v3
with:
name: DocHTML
path: docs/build/html
- name: Setup GitHub Pages
uses: actions/configure-pages@main
- name: Upload HTML
uses: actions/upload-pages-artifact@v1
with:
path: docs/build/html
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@main