瀏覽代碼

retry upload, deploy actions

Aneurin Barker Snook 1 年之前
父節點
當前提交
3832d34733
共有 1 個文件被更改,包括 21 次插入2 次删除
  1. 21 2
      .github/workflows/update-gh-pages.yml

+ 21 - 2
.github/workflows/update-gh-pages.yml

@@ -30,5 +30,24 @@ jobs:
       - name: Build statics
         run: npm run build
 
-      - name: Publish to gh-pages
-        run: npm run publish-gh-pages
+      - name: Upload artifact
+        uses: actions/upload-pages-artifact@v3
+        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