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
62
+ 2 . Create 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 see [jenkey2011/vuepress-deploy](https://github.com/jenkey2011/vuepress-deploy/)
87
+
59
88
### GitHub Pages and Travis CI
60
89
61
90
1. Set correct ` base` in `docs/.vuepress/config.js`.
Original file line number Diff line number Diff line change 56
56
你可以在你的持续集成的设置中,设置在每次 push 代码时自动运行上述脚本。
57
57
:::
58
58
59
+ ### GitHub Pages and Github Actions
60
+
61
+ 1 . 创建 ` Github access token `
62
+ 2 . 在你github仓库下,创建一个 ` secrets ` ,填入刚创建的 ` token `
63
+ 3 . 在项目根目录下的` .github/workflows ` 目录(没有的话,请手动创建一个)下创建一个 ` .yml ` 或者 ` .yaml ` 文件,如:` 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
+ 详细使用方法,可以看[jenkey2011/vuepress-deploy](https://github.com/jenkey2011/vuepress-deploy/)
87
+
59
88
### GitHub Pages and Travis CI
60
89
61
90
1. 在 ` docs/.vuepress/config.js` 中设置正确的 `base`。
You can’t perform that action at this time.
0 commit comments