Skip to content

Commit

Permalink
ci: add action to publish to gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
yagebu committed Dec 24, 2023
1 parent 9484548 commit f390270
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/docs-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy website to GitHub Pages

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

jobs:
build:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: "constraints*.txt"
- run: python -m pip install -c constraints.txt tox
- run: tox -e docs
- uses: actions/configure-pages@v4
- uses: actions/upload-pages-artifact@v3
with:
path: "build/docs"
deploy:
needs: "build"
permissions:
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: "ubuntu-latest"
steps:
- if: github.event_name == 'push'
uses: actions/deploy-pages@v4

0 comments on commit f390270

Please sign in to comment.