Add TODO document for node failure changes #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build, and deploy to either GitHub Pages (production), or Netlify (PR previews) | |
name: "Build and deploy" | |
on: | |
# "Production" deployments run on branch | |
push: | |
branches: ["main"] | |
# Preview deployments run on PRs | |
pull_request: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN | |
permissions: | |
# For GitHub Pages: | |
contents: "read" | |
pages: "write" | |
id-token: "write" | |
# For PR preview comments: | |
pull-requests: "write" | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
# Build job | |
build: | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v3" | |
- uses: "quarto-dev/quarto-actions/setup@v2" | |
- name: "Render Quarto website" | |
run: "quarto render ." | |
- name: "Upload site artifact" | |
uses: "actions/upload-pages-artifact@v1" | |
with: | |
path: "./_site" | |
# Deploy preview to Netlify IFF this action triggered by PR | |
# Based on: https://github.com/quarto-dev/quarto-web/blob/main/.github/workflows/preview.yml | |
deploy_preview: | |
if: "github.event_name == 'pull_request'" | |
runs-on: "ubuntu-latest" | |
needs: "build" | |
steps: | |
- name: "Download site artifact" | |
uses: "actions/download-artifact@v3" | |
with: | |
# The name of artifacts created by `actions/upload-pages-artifact` is always "github-pages" | |
name: "github-pages" | |
path: "./_site" | |
- name: "Untar site artifact" | |
run: "tar --directory ./_site -xvf ./_site/artifact.tar " | |
- name: "Deploy preview to Netlify" | |
uses: "nwtgck/actions-netlify@v2" | |
env: | |
NETLIFY_SITE_ID: "${{ secrets.NETLIFY_SITE_ID }}" | |
NETLIFY_AUTH_TOKEN: "${{ secrets.NETLIFY_AUTH_TOKEN }}" | |
with: | |
publish-dir: "./_site" | |
production-deploy: false | |
github-token: "${{ secrets.GITHUB_TOKEN }}" | |
deploy-message: "Deploy from ${{ github.event.repository.full_name}} GHA: PR ${{ github.event.pull_request.number }} - ${{ github.event.pull_request.title }}" | |
alias: "${{ github.event.repository.name }}-pr-${{ github.event.pull_request.number }}-preview" | |
# these all default to 'true' | |
enable-pull-request-comment: true | |
enable-commit-comment: false | |
enable-commit-status: true | |
overwrites-pull-request-comment: false | |
timeout-minutes: 1 | |
# Deploy to GH Pages IFF this action triggered by push | |
deploy: | |
if: "github.event_name == 'push'" | |
runs-on: "ubuntu-latest" | |
needs: "build" | |
environment: | |
name: "github-pages" | |
url: "${{ steps.deployment.outputs.page_url }}" | |
steps: | |
- name: "Deploy to GitHub Pages" | |
id: "deployment" | |
uses: "actions/deploy-pages@v1" |