Browse Source

try different deploy approach

Aneurin Barker Snook 1 year ago
parent
commit
555eed2f8c
1 changed files with 22 additions and 0 deletions
  1. 22 0
      .github/workflows/update-gh-pages.yml

+ 22 - 0
.github/workflows/update-gh-pages.yml

@@ -29,3 +29,25 @@ jobs:
 
       - name: Publish to gh-pages
         run: npm run publish
+
+      - name: Upload artifact
+        uses: actions/upload-pages-artifact@v4
+        with:
+          name: github-pages
+          path: dist/
+          retention-days: 3
+
+  # https://github.com/actions/deploy-pages?tab=readme-ov-file#usage
+  deploy:
+    needs: build
+    permissions:
+      pages: write
+      id-token: write
+    environment:
+      name: github-pages
+      url: ${{ steps.deployment.outputs.page_url }}
+    runs-on: ubuntu-latest
+    steps:
+      - name: Deploy to GitHub Pages
+        id: deployment
+        uses: actions/deploy-pages@v4