@@ -3,80 +3,22 @@ name: build
33on :
44 schedule :
55 - cron : ' 0 8 * * 0'
6- workflow_dispatch :
76 push :
8- branches : main
7+ branches : ["main","master"]
8+ repository_dispatch :
9+ types : [custom-event]
10+ workflow_dispatch :
11+ pull_request :
12+ branches : ["main","master"]
913
10- permissions :
11- actions : write
12- contents : write
13- pages : write
1414
1515jobs :
16- build :
17- runs-on : ubuntu-latest
18- steps :
19- - name : Check out repository
20- uses : actions/checkout@v4
21-
22- - name : Set up quarto
23- uses : quarto-dev/quarto-actions/setup@v2
24- with :
25- version : pre-release
26- tinytex : true
27-
28- - name : register tinytex globally for diagram.lua
29- run : |
30- mkdir -p ~/.local/bin
31- ~/.TinyTeX/bin/x86_64-linux/tlmgr update --self
32- ~/.TinyTeX/bin/x86_64-linux/tlmgr option sys_bin ~/.local/bin
33- ~/.TinyTeX/bin/x86_64-linux/tlmgr path add
34- ~/.TinyTeX/bin/x86_64-linux/tlmgr install libertinus-fonts
35-
36- - name : Install Computo extension for Quarto
37- run : |
38- quarto add --no-prompt computorg/computo-quarto-extension
39-
40- - name : Install System dependencies
41- run : sudo apt-get install -y librsvg2-bin
42-
43- - name : Install Julia
44- uses : julia-actions/setup-julia@v2
45- with :
46- version : ' 1.11'
47- - uses : julia-actions/cache@v1
48- with :
49- cache-registries : " true"
50-
51- - name : Install Julia Dependencies
52- uses : julia-actions/julia-buildpkg@v1
53-
54- - name : Render
55- run : |
56- quarto render --output-dir=public
57- if [[ ! -f ./public/index.html ]]; then
58- echo "No index.html found in public directory. copying the first HTML file."
59- cp $(ls ./public/*.html | head -n 1) ./public/index.html
60- fi
61-
62- - name : Upload artifact
63- uses : actions/upload-pages-artifact@v3
64- with :
65- path : ./public
66-
67- # Deployment job
68- deploy :
16+ call_env_workflow :
17+ uses : computorg/workflows/.github/workflows/global-env.yml@main
18+ call_quartopublish_workflow :
6919 permissions :
70- pages : write
7120 id-token : write
72- environment :
73- name : github-pages
74- url : ${{ steps.deployment.outputs.page_url }}
75- runs-on : ubuntu-latest
76- needs : build
77- steps :
78- - name : Deploy to GitHub Pages
79- id : deployment
80- uses : actions/deploy-pages@v4
81- with :
82- token : ${{ secrets.GITHUB_TOKEN }}
21+ contents : write
22+ pages : write
23+ uses : computorg/workflows/.github/workflows/publish-render.yml@main
24+ needs : call_env_workflow
0 commit comments