-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.49 KB
/
render_and_deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Render presentation and publish to GitHub Pages
# Render presentation with Quarto on all merges to main, all pull requests,
# or by manual workflow dispatch. The build job can be used as a CI check
# that the presentation still renders successfully.
# The deploy step only runs when a release tag is pushed to the main branch
# and actually pushes the generated html to the gh-pages branch
# (which triggers a GitHub pages deployment).
on:
push:
branches:
- main
tags:
- '*'
pull_request:
workflow_dispatch:
jobs:
build:
name: render and publish
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Render Quarto Project
run: |
quarto render index.qmd --to revealjs
- name: Move outputs to build folder
if: github.event_name == 'push' && github.ref_type == 'tag'
run: |
mkdir build
mv index.html build/
mv index_files build/
touch build/.nojekyll
cp -r img build/
- name: Deploy
if: github.event_name == 'push' && github.ref_type == 'tag'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build