deploy to github pages

This commit is contained in:
Chang She
2023-03-22 18:21:11 -07:00
parent 01db9417fa
commit 1f42104c77

View File

@@ -7,14 +7,23 @@ on:
# 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 one concurrent deployment
concurrency:
group: "rtd"
group: "pages"
cancel-in-progress: true
jobs:
# Single deploy job since we're just deploying
build:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-22.04
steps:
- name: Checkout
@@ -23,7 +32,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: 'pip'
cache: "pip"
cache-dependency-path: "docs/requirements.txt"
- name: Build Python
working-directory: python
@@ -34,3 +43,12 @@ jobs:
working-directory: docs
run: |
mkdoc build
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: "site"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1