9
9
10
10
permissions :
11
11
contents : write
12
+ pages : write
13
+ id-token : write
12
14
15
+ # (...)
13
16
jobs :
14
17
deploy :
15
- name : Deploy to GitHub Pages
18
+ environment :
19
+ name : github-pages
20
+ url : ${{ steps.deployment.outputs.page_url }}
16
21
runs-on : ubuntu-latest
17
22
steps :
18
- - uses : actions/checkout@v3
19
- - uses : actions/setup-node@v3
23
+ - name : Checkout
24
+ uses : actions/checkout@v3
25
+ # 👇 Build steps
26
+ - name : Set up Node.js
27
+ uses : actions/setup-node@v3
20
28
with :
21
29
node-version : 18
22
30
cache : npm
23
-
24
31
- name : Install dependencies
25
32
run : npm install
26
- - name : Build website
33
+ - name : Build
27
34
run : npm run build
28
-
29
- # Popular action to deploy to GitHub Pages:
30
- # Docs: https://github.com/peaceiris/ actions-gh- pages#%EF%B8%8F-docusaurus
31
- - name : Deploy to GitHub Pages
32
- uses : peaceiris/ actions-gh- pages@v3
35
+ # 👆 Build steps
36
+ - name : Setup Pages
37
+ uses : actions/configure- pages@v3
38
+ - name : Upload artifact
39
+ uses : actions/upload- pages-artifact@v2
33
40
with :
34
- github_token : ${{ secrets.GITHUB_TOKEN }}
35
- # Build output to publish to the `gh-pages` branch:
36
- publish_dir : ./build
37
- # The following lines assign commit authorship to the official
38
- # GH-Actions bot for deploys to `gh-pages` branch:
39
- # https://github.com/actions/checkout/issues/13#issuecomment-724415212
40
- # The GH actions bot is used by default if you didn't specify the two fields.
41
- # You can swap them out with your own user credentials.
42
- user_name : github-actions[bot]
43
- user_email : 41898282+github-actions[bot]@users.noreply.github.com
41
+ # 👇 Specify build output path
42
+ path : build
43
+ - name : Deploy to GitHub Pages
44
+ id : deployment
45
+ uses : actions/deploy-pages@v2
0 commit comments