-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (89 loc) · 2.45 KB
/
build_quarto.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Build Website
on:
push:
branches: ["main"]
pull_request:
jobs:
render:
uses: AlgebraicJulia/.github/.github/workflows/render_quarto.yml@main
with:
build_all: false
save_build: true
preview:
needs: render
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: _site
- name: Delete all artifacts
uses: geekyeggo/delete-artifact@v2
with:
name: |
_site
_freeze
- name: Deploy Preview
uses: nwtgck/actions-netlify@v2
with:
publish-dir: .
production-deploy: false
enable-commit-comment: true
github-token: ${{ secrets.GITHUB_TOKEN }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
deploy:
needs: render
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Make sure to only download _site folder
run: rm -rf _site
- uses: actions/download-artifact@v4
with:
name: _site
path: _site
- name: Delete _site artifact
uses: geekyeggo/delete-artifact@v2
with:
name: _site
- name: Deploy to Production
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: netlify
FOLDER: _site
update-freeze:
needs: render
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Remove old _freeze directory
run: rm -rf _freeze
- name: Get new _freeze directory
uses: actions/download-artifact@v4
continue-on-error: true
with:
name: _freeze
path: _freeze
- name: Delete _freeze artifact
uses: geekyeggo/delete-artifact@v2
with:
name: _freeze
- name: Commit updated _freeze directory
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update _freeze directory
test-all-posts:
needs: deploy
uses: AlgebraicJulia/.github/.github/workflows/render_quarto.yml@main
with:
build_all: true
save_build: false