File tree Expand file tree Collapse file tree 2 files changed +46
-7
lines changed Expand file tree Collapse file tree 2 files changed +46
-7
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy PR preview
2
+ on :
3
+ pull_request :
4
+ types :
5
+ - opened
6
+ - reopened
7
+ - synchronize
8
+ - closed
9
+
10
+ jobs :
11
+ deploy-preview :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - uses : actions/checkout@v3
15
+
16
+ - uses : actions/setup-node@v3
17
+ with :
18
+ node-version : 20
19
+ cache : yarn
20
+ cache-dependency-path : yarn.lock
21
+
22
+ - name : Install dependencies
23
+ run : yarn install --frozen-lockfile
24
+
25
+ - name : Build website
26
+ run : BASE_URL='/format/pr-preview/pr-${{ github.event.number }}/' yarn build
27
+ working-directory : ./packages/web
28
+
29
+ - name : Deploy to GitHub Pages
30
+ uses : rossjrw/pr-preview-action@v1
31
+ with :
32
+ token : ${{ secrets.GITHUB_TOKEN }}
33
+ source-dir : ./packages/web/build
34
+ preview-branch : gh-pages
35
+ umbrella-dir : pr-preview
36
+ action : auto
Original file line number Diff line number Diff line change @@ -23,13 +23,16 @@ jobs:
23
23
working-directory : ./packages/web
24
24
25
25
- name : Deploy to GitHub Pages
26
- uses : peaceiris/actions-gh- pages@v3
26
+ uses : JamesIves/github- pages-deploy-action@v4
27
27
with :
28
- github_token : ${{ secrets.GITHUB_TOKEN }}
29
-
30
- publish_dir : ./packages/web/build
31
-
28
+ token : ${{ secrets.GITHUB_TOKEN }}
29
+ folder : ./packages/web/build
30
+ branch : gh-pages
32
31
# default deployer
33
- user_name : ' github-actions[bot]'
34
- user_email : ' github-actions[bot]@users.noreply.github.com'
32
+ git-config-name : ' github-actions[bot]'
33
+ git-config-email : ' github-actions[bot]@users.noreply.github.com'
34
+ # don't break preview deployments
35
+ clean-exclude : pr-preview
36
+ force : false
37
+
35
38
You can’t perform that action at this time.
0 commit comments