File tree 3 files changed +46
-3
lines changed
3 files changed +46
-3
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy to GitHub Pages
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ # Review gh actions docs if you want to further define triggers, paths, etc
8
+ # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
9
+
10
+ permissions :
11
+ contents : write
12
+
13
+ jobs :
14
+ deploy :
15
+ name : Deploy to GitHub Pages
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+ - uses : actions/checkout@v3
19
+ - uses : actions/setup-node@v3
20
+ with :
21
+ node-version : 18
22
+ cache : yarn
23
+
24
+ - name : Install dependencies
25
+ run : yarn install --frozen-lockfile
26
+ - name : Build website
27
+ run : yarn 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
33
+ 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
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ const config: Config = {
11
11
url : 'https://trinhdaiphuc.github.io/' ,
12
12
// Set the /<baseUrl>/ pathname under which your site is served
13
13
// For GitHub pages deployment, it is often '/<projectName>/'
14
- baseUrl : '/notes ' ,
14
+ baseUrl : '/' ,
15
15
16
16
// GitHub pages deployment config.
17
17
// If you aren't using GitHub pages, you don't need these.
Original file line number Diff line number Diff line change 7
7
"start" : " docusaurus start" ,
8
8
"build" : " docusaurus build" ,
9
9
"swizzle" : " docusaurus swizzle" ,
10
- "deploy" : " docusaurus deploy" ,
10
+ "deploy" : " DEPLOYMENT_BRANCH=main docusaurus deploy" ,
11
11
"clear" : " docusaurus clear" ,
12
12
"serve" : " docusaurus serve" ,
13
13
"write-translations" : " docusaurus write-translations" ,
44
44
"engines" : {
45
45
"node" : " >=18.0"
46
46
}
47
- }
47
+ }
You can’t perform that action at this time.
0 commit comments