Skip to content

Commit

Permalink
Add deployment via GH action
Browse files Browse the repository at this point in the history
  • Loading branch information
jansim committed Jul 17, 2024
1 parent 3cfff82 commit 50e8faf
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Render and Deploy

on:
workflow_dispatch:
push:
branches: main

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false

jobs:
render:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
tinytex: true

- name: Render Slides
uses: quarto-dev/quarto-actions/render@v2

- name: Render README / index.html
run: quarto render README.qmd --to=html
- name: Move index.html to output
run: |
mv index.html output/index.html
mv README_files output/README_files
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: output

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: render
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 50e8faf

Please sign in to comment.