We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6f9c9fd commit 62b1a79Copy full SHA for 62b1a79
.github/workflows/build.yaml
@@ -64,6 +64,34 @@ jobs:
64
path: public
65
name: public
66
67
+ preview:
68
+ name: Preview when PR exists branch
69
+ runs-on: ubuntu-latest
70
+ needs: build
71
+ if: github.event_name == 'pull_request' && github.event.action != 'closed'
72
+ steps:
73
+ - name: Check out the repo
74
+ uses: actions/checkout@v4
75
+ with:
76
+ fetch-depth: 0
77
+
78
+ - name: Get artifacts from build job
79
+ uses: actions/download-artifact@v4
80
81
+ name: public
82
+ path: public
83
84
+ - uses: actions/upload-pages-artifact@v3
85
86
87
+ name: pages
88
89
+ - name: Deploy to GitHub Pages
90
+ uses: actions/deploy-pages@v4
91
92
+ artifact_name: pages
93
+ preview: true
94
95
deploy:
96
if: github.ref == 'refs/heads/main'
97
needs: build
0 commit comments