-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (45 loc) · 1.24 KB
/
main.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
55
name: Publish to GitHub Pages
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
env:
QUARTO_VERSION: 1.4.543
environment:
name: github-pages
permissions:
contents: read
pages: write
id-token: write
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Cache dependencies
id: caching
uses: actions/cache@v3
with:
path: .dependencies
key: quarto-${{ env.QUARTO_VERSION }}
- if: ${{ steps.caching.outputs.cache-hit != 'true' }}
name: Download Quarto
run: |
mkdir .dependencies && cd .dependencies
wget --no-verbose https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.deb
- name: Install Quarto
run: |
sudo apt install ./.dependencies/*.deb
- name: Render website
run: |
quarto render
# Use README.html rather than index.html as homepage file
cd _site
rm index.html && ln -s README.html index.html
- uses: actions/upload-pages-artifact@v3
with:
path: _site
- uses: actions/deploy-pages@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}