File tree Expand file tree Collapse file tree 2 files changed +58
-0
lines changed Expand file tree Collapse file tree 2 files changed +58
-0
lines changed Original file line number Diff line number Diff line change 56
56
You can also run the above script in your CI setup to enable automatic deployment on each push.
57
57
:::
58
58
59
+ ### GitHub Pages and GitHub Actions
60
+
61
+ 1 . [ Create a personal access token] ( https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token ) ;
62
+ 2 . Create [ encrypted secrets] ( https://docs.github.com/en/actions/security-guides/encrypted-secrets ) under your repository;
63
+ 3 . Create a ` .yml ` or ` .yaml ` file in the ` .github/workflows ` directory in the root of your repository. e.g:` vuepress-deploy.yml ` :
64
+
65
+ ``` yml
66
+ name : Build and Deploy
67
+ on : [push]
68
+ jobs :
69
+ build-and-deploy :
70
+ runs-on : ubuntu-latest
71
+ steps :
72
+ - name : Checkout
73
+ uses : actions/checkout@master
74
+
75
+ - name : vuepress-deploy
76
+ uses : jenkey2011/vuepress-deploy@master
77
+ env :
78
+ ACCESS_TOKEN : ${{ secrets.ACCESS_TOKEN }}
79
+ TARGET_REPO : username/repo
80
+ TARGET_BRANCH : master
81
+ BUILD_SCRIPT : yarn && yarn build
82
+ BUILD_DIR : docs/.vuepress/dist
83
+ CNAME : https://www.xxx.com
84
+ ` ` `
85
+
86
+ For more information, you can checkout [jenkey2011/vuepress-deploy](https://github.com/jenkey2011/vuepress-deploy/).
87
+
59
88
### GitHub Pages and Travis CI
60
89
61
90
1. Set the correct ` base` in `docs/.vuepress/config.js`.
Original file line number Diff line number Diff line change 81
81
你可以在你的持续集成的设置中,设置在每次 push 代码时自动运行上述脚本。
82
82
:::
83
83
84
+ ### GitHub Pages and Github Actions
85
+
86
+ 1 . 创建 [ Github access token] ( https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token ) ;
87
+ 2 . 在你 github 仓库下,创建一个 [ secrets] ( https://docs.github.com/en/actions/security-guides/encrypted-secrets ) ,填入刚创建的 ` token `
88
+ 3 . 在项目根目录下的 ` .github/workflows ` 目录(没有的话,请手动创建一个)下创建一个 ` .yml ` 或者 ` .yaml ` 文件,如:` vuepress-deploy.yml ` ;
89
+
90
+ ``` yml
91
+ name : Build and Deploy
92
+ on : [push]
93
+ jobs :
94
+ build-and-deploy :
95
+ runs-on : ubuntu-latest
96
+ steps :
97
+ - name : Checkout
98
+ uses : actions/checkout@master
99
+
100
+ - name : vuepress-deploy
101
+ uses : jenkey2011/vuepress-deploy@master
102
+ env :
103
+ ACCESS_TOKEN : ${{ secrets.ACCESS_TOKEN }}
104
+ TARGET_REPO : username/repo
105
+ TARGET_BRANCH : master
106
+ BUILD_SCRIPT : yarn && yarn build
107
+ BUILD_DIR : docs/.vuepress/dist
108
+ CNAME : https://www.xxx.com
109
+ ` ` `
110
+
111
+ 详细使用方法,可以看[jenkey2011/vuepress-deploy](https://github.com/jenkey2011/vuepress-deploy/)
112
+
84
113
### GitHub Pages and Travis CI
85
114
86
115
1. 在 ` docs/.vuepress/config.js` 中设置正确的 `base`。
You can’t perform that action at this time.
0 commit comments