-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (40 loc) · 1.08 KB
/
Copy pathdeploy.yml
File metadata and controls
50 lines (40 loc) · 1.08 KB
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
name: Build and deploy slides
on:
pull_request:
branches: [ "main" ]
push:
branches: [ "main" ]
# Allows manual run
workflow_dispatch:
jobs:
# Builds slides with quarto and deploys them to a branch
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/setup-python@v6
with:
python-version: '3.13'
cache: 'pip'
- run: pip install -r requirements.txt
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Render Quarto Project
run: |
cd src
quarto render slides.qmd
cd ../
- name: Test pages build
if: github.ref != 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: test-pages
folder: src
dry-run: true
- name: Deploy pages for main
if: github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: src