Browse Source

add github actions workflow

Lennart Wittkuhn 1 year ago
parent
commit
ac58c58bcb
2 changed files with 50 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 49 0
      .github/workflows/main.yml

+ 1 - 0
.gitattributes

@@ -9,3 +9,4 @@ renv.lock annex.largefiles=nothing
 /renv/ annex.largefiles=nothing
 .gitignore annex.largefiles=nothing
 index.qmd annex.largefiles=nothing
+.github/workflows/main.yml annex.largefiles=nothing

+ 49 - 0
.github/workflows/main.yml

@@ -0,0 +1,49 @@
+# on:
+#   workflow_dispatch:
+#   push:
+#     branches: master
+name: Quarto Publish
+jobs:
+  retrieve:
+    runs-on: ubuntu-latest
+    container:
+      image: lennartwittkuhn/datalad:0.17.6
+      entrypoint: [""]
+    steps:
+      - name: Install and Build
+        run: |
+          datalad install --get-data https://github.com/$GITHUB_REPOSITORY
+          datalad unlock -d replay-illustrations replay-illustrations/illustrations
+      - name: Upload artifact
+        uses: actions/upload-artifact@v2
+        with:
+          name: page
+          path: replay-illustrations/illustrations
+  build-deploy:
+    runs-on: ubuntu-latest
+    permissions:
+      contents: write
+    steps:
+      - name: Check out repository
+        uses: actions/checkout@v2
+      - name: Download artifact
+        uses: actions/download-artifact@v2
+        with:
+          name: page
+          path: replay-illustrations/illustrations
+      - name: Set up Quarto
+        uses: quarto-dev/quarto-actions/setup@v2
+      - name: Install R
+        uses: r-lib/actions/setup-r@v2
+        with:
+          r-version: '4.2.0'
+      - name: Install R Dependencies
+        uses: r-lib/actions/setup-renv@v2
+        with:
+          cache-version: 1
+      - name: Render and Publish
+        uses: quarto-dev/quarto-actions/publish@v2
+        with:
+          target: gh-pages
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}