Skip to content

Commit

Permalink
Merge pull request #9 from epiverse-trace/fix-deploy
Browse files Browse the repository at this point in the history
Copy build and deploy from epiforecasts quarto site
  • Loading branch information
thibautjombart authored Sep 8, 2022
2 parents 2ff8fd4 + 9b103b9 commit 5f31a06
Showing 1 changed file with 39 additions and 17 deletions.
56 changes: 39 additions & 17 deletions .github/workflows/render_blueprints.yml
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

0 comments on commit 5f31a06

Please sign in to comment.