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: Publish to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - develop | |
| pull_request: | |
| branches: | |
| - master | |
| - develop | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4.2.2 | |
| with: | |
| submodules: true | |
| - name: Setup Hugo | |
| uses: peaceiris/actions-hugo@v3 | |
| with: | |
| hugo-version: '0.148.0' | |
| extended: true | |
| - name: Setup R | |
| uses: r-lib/actions/setup-r@v2 | |
| - name: Setup pandoc | |
| uses: r-lib/actions/setup-pandoc@v2 | |
| - name: Setup tinytex | |
| uses: r-lib/actions/setup-tinytex@v2 | |
| - name: Setup tex packages | |
| run: > | |
| tlmgr update --self | |
| tlmgr install amsfonts amsmath lm unicode-math | |
| iftex listings fancyvrb fancyhdr | |
| booktabs multirow bookmark xcolor | |
| soul geometry setspace babel; | |
| - name: Setup dependencies | |
| uses: r-lib/actions/setup-r-dependencies@v2 | |
| - name: Build mds | |
| run: tools/md_all; | |
| - name: Build site | |
| run: hugo build | |
| - name: Build pdfs | |
| run: tools/pdf_all; | |
| - name: Correcting headers | |
| run: tools/headers; | |
| - name: Upload static files as artifact | |
| id: deployment | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: public/ | |
| publish: | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| pages: write | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |