main.yml 1.4 KB

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