|
1 | | -name: build |
| 1 | +name: Main Workflows |
| 2 | + |
2 | 3 | on: |
3 | 4 | push: |
4 | | - branches: |
5 | | - - master |
6 | | - - main |
| 5 | + branches: ["main","master"] |
| 6 | + repository_dispatch: |
| 7 | + types: [custom-event] |
| 8 | + workflow_dispatch: |
| 9 | + pull_request: |
| 10 | + branches: ["main","master"] |
7 | 11 |
|
8 | | -env: # Change this if needed |
9 | | - quarto_file: published-elmasri-optimal |
10 | | - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} |
11 | 12 |
|
12 | 13 | jobs: |
13 | | - computorticle: |
14 | | - runs-on: ubuntu-latest |
15 | | - |
16 | | - steps: |
17 | | - - name: Checking out repository for Github action |
18 | | - uses: actions/checkout@v2 |
19 | | - |
20 | | - - name: Installing dependencies with Micromamba |
21 | | - uses: mamba-org/provision-with-micromamba@main |
22 | | - with: |
23 | | - cache-env: true |
24 | | - |
25 | | - - name: Installing quarto |
26 | | - uses: quarto-dev/quarto-actions/setup@v2 |
27 | | - with: |
28 | | - tinytex: true |
29 | | - |
30 | | - - name: register tinytex globally for diagram.lua |
31 | | - run: | |
32 | | - mkdir -p ~/.local/bin |
33 | | - ~/.TinyTeX/bin/x86_64-linux/tlmgr option sys_bin ~/.local/bin |
34 | | - ~/.TinyTeX/bin/x86_64-linux/tlmgr path add |
35 | | - ~/.TinyTeX/bin/x86_64-linux/tlmgr install libertinus-fonts |
36 | | - |
37 | | - - name: Install Computo extension for Quarto |
38 | | - run: | |
39 | | - quarto add --no-prompt computorg/computo-quarto-extension |
40 | | -
|
41 | | - - name: Rendering with Quarto |
42 | | - shell: bash -l {0} |
43 | | - run: | |
44 | | - quarto render ${{ env.quarto_file }}.qmd |
45 | | - mkdir _build |
46 | | - mv ${{ env.quarto_file }}.html _build/index.html |
47 | | - mv -vf ${{ env.quarto_file }}_files figures ${{ env.quarto_file }}.pdf _build/ |
48 | | - cp environment.yml _build/ |
49 | | - touch _build/.nojekyll |
| 14 | + call_env_workflow: |
| 15 | + uses: computorg/workflows/.github/workflows/global-env.yml@main |
| 16 | + call_quartopublish_workflow: |
| 17 | + permissions: |
| 18 | + id-token: write |
| 19 | + contents: write |
| 20 | + pages: write |
| 21 | + uses: computorg/workflows/.github/workflows/publish-render.yml@main |
| 22 | + needs: call_env_workflow |
50 | 23 |
|
51 | | - - name: Deploying article on github pages |
52 | | - uses: JamesIves/github-pages-deploy-action@v4 |
53 | | - with: |
54 | | - BRANCH: gh-pages |
55 | | - FOLDER: _build |
56 | | - CLEAN: true |
0 commit comments