Commit 9f5f558 1 parent 2bb8888 commit 9f5f558 Copy full SHA for 9f5f558
File tree 1 file changed +68
-0
lines changed
1 file changed +68
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy Website to GitHub Pages
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ paths :
8
+ - ' docs/**'
9
+ - ' website/**'
10
+ - ' packages/cspell-types/**/*.ts'
11
+ # Run on demand
12
+ workflow_dispatch :
13
+
14
+ permissions :
15
+ contents : read
16
+
17
+ jobs :
18
+ build :
19
+ name : Build Website
20
+ runs-on : ubuntu-latest
21
+ steps :
22
+ - uses : actions/checkout@v4
23
+
24
+ - name : Setup Node and Pnpm
25
+ uses : ./.github/actions/setup-node
26
+ with :
27
+ node-version : 20.x
28
+
29
+ - name : Build website
30
+ run : |
31
+ pnpm i
32
+ pnpm run build
33
+ cd website
34
+ pnpm run build:site
35
+ - uses : actions/upload-artifact@v4
36
+ with :
37
+ name : website
38
+ path : website/build
39
+ retention-days : 1
40
+
41
+ deploy :
42
+ name : Deploy to GitHub Pages
43
+ permissions :
44
+ contents : write
45
+ needs : build
46
+ runs-on : ubuntu-latest
47
+ steps :
48
+ - uses : actions/download-artifact@v4
49
+ with :
50
+ name : website
51
+
52
+ # Popular action to deploy to GitHub Pages:
53
+ # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
54
+ # cspell:ignore peaceiris
55
+ - name : Deploy to GitHub Pages
56
+ uses : peaceiris/actions-gh-pages@v4
57
+ with :
58
+ github_token : ${{ secrets.GITHUB_TOKEN }}
59
+ # Build output to publish to the `gh-pages` branch:
60
+ publish_dir : ./
61
+ # The following lines assign commit authorship to the official
62
+ # GH-Actions bot for deploys to `gh-pages` branch:
63
+ # https://github.com/actions/checkout/issues/13#issuecomment-724415212
64
+ # The GH actions bot is used by default if you didn't specify the two fields.
65
+ # You can swap them out with your own user credentials.
66
+ user_name : github-actions[bot]
67
+ user_email : 41898282+github-actions[bot]@users.noreply.github.com
68
+ disable_nojekyll : true # cspell:ignore nojekyll
You can’t perform that action at this time.
0 commit comments