Skip to content

Commit

Permalink
update publish flow
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronsteers committed Feb 16, 2024
1 parent 2133a8a commit a972b94
Showing 1 changed file with 31 additions and 7 deletions.
38 changes: 31 additions & 7 deletions .github/workflows/pydoc_publish.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
name: Generate Python Documentation
name: Publish Documentation Site

on:
push:
branches:
- main

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
deploy:
runs-on: ubuntu-latest
environment:
name: "github-pages"
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Checkout code
Expand All @@ -21,16 +39,22 @@ jobs:
with:
python-version: '3.10'
cache: 'poetry'
- name: Setup Pages
uses: actions/configure-pages@v4

- name: Install dependencies
run: poetry install

- name: Generate documentation
run: |
pdoc --html --output-dir docs .
poetry run generate-docs
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
# Upload entire repository
path: '.'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit a972b94

Please sign in to comment.