main.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. on:
  2. workflow_dispatch:
  3. push:
  4. branches: [master, index]
  5. name: Quarto Publish
  6. jobs:
  7. retrieve:
  8. runs-on: ubuntu-latest
  9. container:
  10. image: lennartwittkuhn/datalad:0.17.6
  11. steps:
  12. - name: Install and Build
  13. run: |
  14. datalad install --get-data https://github.com/$GITHUB_REPOSITORY
  15. datalad unlock -d replay-illustrations replay-illustrations/illustrations
  16. - name: Upload artifact
  17. uses: actions/upload-artifact@v2
  18. with:
  19. name: illustrations
  20. path: replay-illustrations/illustrations
  21. build-deploy:
  22. runs-on: ubuntu-latest
  23. needs: retrieve
  24. permissions:
  25. contents: write
  26. steps:
  27. - name: Check out repository
  28. uses: actions/checkout@v2
  29. - name: Download artifact
  30. uses: actions/download-artifact@v2
  31. with:
  32. name: illustrations
  33. path: replay-illustrations/illustrations
  34. - name: Set up Quarto
  35. uses: quarto-dev/quarto-actions/setup@v2
  36. - name: Install R
  37. uses: r-lib/actions/setup-r@v2
  38. with:
  39. r-version: '4.2.0'
  40. - name: Install R Dependencies
  41. uses: r-lib/actions/setup-renv@v2
  42. with:
  43. cache-version: 1
  44. - name: Render and Publish
  45. uses: quarto-dev/quarto-actions/publish@v2
  46. with:
  47. target: gh-pages
  48. env:
  49. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}