main.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. options: --entrypoint /bin/sh
  12. steps:
  13. - name: Install and Build
  14. run: |
  15. datalad install --get-data https://github.com/$GITHUB_REPOSITORY
  16. datalad unlock -d replay-illustrations replay-illustrations/illustrations
  17. - name: Upload artifact
  18. uses: actions/upload-artifact@v2
  19. with:
  20. name: illustrations
  21. path: replay-illustrations/illustrations
  22. build-deploy:
  23. runs-on: ubuntu-latest
  24. needs: retrieve
  25. permissions:
  26. contents: write
  27. steps:
  28. - name: Check out repository
  29. uses: actions/checkout@v2
  30. - name: Download artifact
  31. uses: actions/download-artifact@v2
  32. with:
  33. name: illustrations
  34. path: replay-illustrations/illustrations
  35. - name: Set up Quarto
  36. uses: quarto-dev/quarto-actions/setup@v2
  37. - name: Install R
  38. uses: r-lib/actions/setup-r@v2
  39. with:
  40. r-version: '4.2.0'
  41. - name: Install R Dependencies
  42. uses: r-lib/actions/setup-renv@v2
  43. with:
  44. cache-version: 1
  45. - name: Render and Publish
  46. uses: quarto-dev/quarto-actions/publish@v2
  47. with:
  48. target: gh-pages
  49. env:
  50. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}