Build and Deploy Website #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Deploy Website | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| workflow_run: | |
| workflows: ["Sync Audit Data"] | |
| types: | |
| - completed | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: deploy-main | |
| cancel-in-progress: true | |
| jobs: | |
| deploy: | |
| if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Julia | |
| uses: julia-actions/setup-julia@v2 | |
| with: | |
| version: "1" | |
| - name: Cache Julia packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.julia | |
| key: ${{ runner.os }}-julia-${{ hashFiles('Project.toml', 'Manifest.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-julia- | |
| - name: Instantiate Julia project | |
| run: julia --project=. -e "using Pkg; Pkg.instantiate()" | |
| - name: Set up Quarto | |
| uses: quarto-dev/quarto-actions/setup@v2 | |
| - name: Render site | |
| uses: quarto-dev/quarto-actions/render@v2 | |
| - name: Deploy website to gh-pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_branch: gh-pages | |
| publish_dir: ./_site | |
| keep_files: true | |
| cname: juliahealth.org | |
| commit_message: "ci: deploy website [skip ci]" |