diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index 07a2a8b..4f648ed 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -1,28 +1,16 @@ name: Github Pages on: - push: - branches: - - "**" + pull_request: + branches: ["main"] - # Allows you to run this workflow manually from the Actions tab + # 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: "pages" - cancel-in-progress: true - + workflow_call: jobs: build: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest env: # Directory that will be published on github pages PUBLISH_DIR: ./_build/html @@ -40,29 +28,10 @@ jobs: - name: Build docs run: jupyter book build . - - - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + + - name: Upload documentation as artifact + uses: actions/upload-artifact@v3 with: + name: documentation path: ${{ env.PUBLISH_DIR }} - - - # Single deploy job since we're just deploying - deploy: - if: github.ref == 'refs/heads/main' - needs: build - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Pages - uses: actions/configure-pages@v2 - - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v1 + if-no-files-found: error \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..1382032 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,54 @@ +name: Deploy to Github pages + +on: + push: + branches: [main] + +# 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: "pages" + cancel-in-progress: true + +jobs: + + + # Build documentation/website. Will be downloaded in first step + build-docs: + uses: ./.github/workflows/build_docs.yml + + deploy: + needs: [build-docs] + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest + steps: + - name: Download docs artifact + # docs artifact is uploaded by build-docs job + uses: actions/download-artifact@v3 + with: + name: documentation + path: "./public" + + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: "./public" + + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup Pages + uses: actions/configure-pages@v3 + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index df0e22f..d8b34da 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -42,12 +42,12 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + uses: docker/metadata-action@v4 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Build and push Docker image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: context: . push: true diff --git a/_config.yml b/_config.yml index dd9b653..e1bd2a4 100644 --- a/_config.yml +++ b/_config.yml @@ -33,6 +33,7 @@ parse: sphinx: config: bibtex_bibfiles: ["docs/refs.bib"] + html_last_updated_fmt: "%b %d, %Y" extra_extensions: - 'sphinx.ext.autodoc' diff --git a/docs/logo.png b/docs/logo.png index ca31bd6..dd93cac 100644 Binary files a/docs/logo.png and b/docs/logo.png differ