-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from epiverse-trace/fix-deploy
Copy build and deploy from epiforecasts quarto site
- Loading branch information
Showing
1 changed file
with
39 additions
and
17 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,49 @@ | ||
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples | ||
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: main | ||
branches: [main, master] | ||
pull_request: | ||
branches: [main, master] | ||
|
||
name: Render and Publish | ||
name: Render blueprints | ||
|
||
jobs: | ||
build-deploy: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
LANG: "en_US.UTF-8" | ||
LC_ALL: "en_US.UTF-8" | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Quarto | ||
uses: quarto-dev/quarto-actions/setup@v2 | ||
with: | ||
# To install LaTeX to build PDF book | ||
tinytex: true | ||
# uncomment below and fill to pin a version | ||
# version: 0.9.600 | ||
- uses: r-lib/actions/setup-tinytex@v2 | ||
|
||
- uses: quarto-dev/quarto-actions/setup@main | ||
|
||
- name: Render site | ||
run: quarto render | ||
|
||
- name: Publish to GitHub Pages (and render) | ||
uses: quarto-dev/quarto-actions/publish@v2 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
target: gh-pages | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # this secret is always available for github actions | ||
path: ./_book | ||
|
||
# Deployment job | ||
deploy: | ||
if: github.event_name != 'pull_request' | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | ||
permissions: | ||
pages: write # to deploy to Pages | ||
id-token: write # to verify the deployment originates from an appropriate source | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |