Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Docs

"on":
pull_request:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: read

jobs:
validate:
name: Validate documentation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: requirements-docs.txt

- name: Check Dev Notes renderer syntax
run: python -m py_compile scripts/render-dev-notes.py

- name: Build documentation
run: scripts/build-docs.sh

deploy:
name: Deploy documentation
if: >-
github.ref == 'refs/heads/main' &&
(github.event_name == 'push' || github.event_name == 'workflow_dispatch')
needs: validate
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
concurrency:
group: github-pages
cancel-in-progress: false
steps:
- name: Checkout
uses: actions/checkout@v7

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: requirements-docs.txt

- name: Configure GitHub Pages
uses: actions/configure-pages@v6

- name: Build documentation
run: scripts/build-docs.sh

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v5
with:
path: site

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
15 changes: 0 additions & 15 deletions .gitlab-ci.yml

This file was deleted.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ OpenShell as the runtime.
navigation entries from post front matter.
- `zensical.toml` configures the documentation site.
- `requirements-docs.txt` pins the documentation build toolchain.
- `.gitlab-ci.yml` builds the documentation site in GitLab CI.
- `.github/workflows/docs.yml` validates documentation builds in GitHub Actions
and deploys the generated site to GitHub Pages.

## Documentation workflow

Expand Down