File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed
Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -37,9 +37,10 @@ The action will auto deploy the vuepress project when you push your code. Enjoy!
3737| :------------ | :------------ |:------------ |:------------ |
3838| ` ACCESS_TOKEN` | Personal access token | `secrets` | **Yes** |
3939| `TARGET_REPO` | The repository you want to deploy. e.g.:`jenkey2011/blog`. Default : **current repository** | `env` | **No** |
40- | `TARGET_REPO` | The branch you want to deploy. e.g.:`github -pages`.Default : **github -pages** | `env` | **No** |
40+ | `TARGET_REPO` | The branch you want to deploy. e.g.:`gh -pages`.Default : **gh -pages** | `env` | **No** |
4141| `BUILD_SCRIPT` | The script to build the vuepress project. e.g. : ` yarn && yarn build` | `env` | **Yes** |
4242| `BUILD_DIR` | The output of the build-script above. e.g. : ` blog/.vuepress/dist/` | `env` | **Yes** |
43+ | `CNAME` | Alias Record of your site. | `env` | **no** |
4344
4445
4546# # Step-by-Step Guide
Original file line number Diff line number Diff line change @@ -37,10 +37,10 @@ jobs:
3737| :------------ | :------------ |:------------ |:------------ |
3838| `ACCESS_TOKEN` | github的token | `secrets` | **是** |
3939| `TARGET_REPO` | 目标仓库,例: `jenkey2011/blog`。**默认当前仓库** | `env` | **否** |
40- | `TARGET_REPO` | 目标仓库的分支,例:`github -pages`。**默认 github -pages**| `env` | **否** |
40+ | `TARGET_REPO` | 目标仓库的分支,例:`gh -pages`。**默认 gh -pages**| `env` | **否** |
4141| `BUILD_SCRIPT` | 构建脚本 例: `yarn && yarn build` | `env` | **是** |
4242| `BUILD_DIR` | 构建产物的目录 e.g. : ` blog/.vuepress/dist/` | `env` | **是** |
43-
43+ | `CNAME` | Github Pages 站点别名 | `env` | **no** |
4444# # 详细教程
4545
4646# ## 创建token
Original file line number Diff line number Diff line change @@ -13,9 +13,6 @@ echo "Build success"
1313echo " ==> Changing directory to '$BUILD_DIR ' ..."
1414cd $BUILD_DIR
1515
16- echo " #################################################"
17- echo " Now deploying to GitHub Pages..."
18-
1916# Get respository
2017if [[ -z " $TARGET_REPO " ]]; then
2118 REPOSITORY_NAME=" ${GITHUB_REPOSITORY} "
@@ -45,6 +42,12 @@ if [ -z "$(git status --porcelain)" ]; then
4542 exit 0
4643fi
4744
45+ # Generate a CNAME file
46+ if [ ! -z " $CNAME " ]; then
47+ echo " Generating a CNAME file..."
48+ echo $CNAME > CNAME
49+ fi
50+
4851echo " ==> Starting deploying"
4952
5053git add .
You can’t perform that action at this time.
0 commit comments