Improvements Jelle (#30) #7
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
| on: | |
| push: | |
| branches: | |
| - main | |
| name: Render and Publish Quarto Site | |
| permissions: | |
| contents: write | |
| pages: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Quarto | |
| uses: quarto-dev/quarto-actions/setup@v2 | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Render Quarto project | |
| run: | | |
| quarto render | |
| - name: Copy static assets to docs folder | |
| run: | | |
| cp -R images/* docs/images/ | |
| - name: Upload HTML files as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: quarto-html-output | |
| path: docs/**/*.html | |
| - name: Commit and push specific files | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git add docs/index.html | |
| git add docs/simulation.html | |
| git add docs/ASReviewLAB.html | |
| git add docs/datatools.html | |
| git add docs/images/ | |
| if git diff --cached --quiet; then | |
| echo "No changes to commit." | |
| else | |
| git commit -m "Update Quarto files" | |
| git push origin main | |
| fi | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |