Skip to content

Commit

Permalink
CI: Build and deploy docs to GitHub pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ghisvail committed Aug 13, 2024
1 parent a457e38 commit 0ec1037
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: docs

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

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
build:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: pip
- name: Install Hatch
uses: pypa/hatch@install
- name: Build docs
run: hatch run docs:build
- name: Enable GitHub Pages
uses: actions/configure-pages@v5
- name: Upload docs
uses: actions/upload-pages-artifact@v3
with:
path: './docs/_build/html'

deploy:
permissions:
pages: write
id-token: write
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy docs
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 0ec1037

Please sign in to comment.