From 1f42104c779858e2fc0e7b58f2a138914350531c Mon Sep 17 00:00:00 2001 From: Chang She <759245+changhiskhan@users.noreply.github.com> Date: Wed, 22 Mar 2023 18:21:11 -0700 Subject: [PATCH] deploy to github pages --- .github/workflows/docs.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 293ca5ad..2cb88be2 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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