-
Notifications
You must be signed in to change notification settings - Fork 27
40 lines (33 loc) · 1 KB
/
publish.yaml
File metadata and controls
40 lines (33 loc) · 1 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
name: "Render and Publish"
on:
push:
branches:
- master
workflow_dispatch:
# you need these permissions to publish to GitHub pages
permissions:
contents: write
pages: write
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # Checkout the repo to find files, such as the env
- name: Setup the environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yaml
init-shell: bash
cache-environment: true
post-cleanup: none
- name: Build the website
run: quarto render
shell: bash -el {0} # Required to see the mamba init env
# Push the website to the gh-pages branch
- name: Push the PR version of the website to gh-pages branch
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site
keep_files: true
destination_dir: .