Skip to content

Commit 521c9c9

Browse files
committed
📝 update readme
1 parent f83e0cc commit 521c9c9

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

.github/actions/deploy/entrypoint.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,17 @@ then
3131
COMMIT_NAME="${GITHUB_ACTOR}"
3232
fi
3333

34-
# Directs the action to the the Github workspace.
3534
cd $GITHUB_WORKSPACE && \
3635

37-
# Configures Git.
3836
git init && \
3937
git config --global user.email "${COMMIT_EMAIL}" && \
4038
git config --global user.name "${COMMIT_NAME}" && \
4139

4240

43-
## Initializes the repository path using the access token.
4441
REPOSITORY_PATH="https://${ACCESS_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" && \
4542

43+
git checkout "${BASE_BRANCH:-master}"
4644

47-
# Builds the project if a build script is provided.
4845
echo "-----------------------Running build scripts... ---------------"
4946

5047
eval "$BUILD_SCRIPT" && \

.github/workflows/deploy.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ jobs:
1818
COMMIT_EMAIL: jeoy_z@126.com
1919
COMMIT_NAME: jeoy
2020
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
21-
BASE_BRANCH: master # The branch the action should deploy from.
22-
# DEPLOY_BRANCH: gh-pages # The branch the action should deploy to.
23-
FOLDER: build # The folder the action should deploy.
24-
BUILD_SCRIPT: yarn && yarn build # The build script the action should run prior to deploying.
21+
BASE_BRANCH: master # The branch you want to build
22+
DEPLOY_BRANCH: gh-pages # The branch you want to deploy
23+
BUILD_SCRIPT: yarn && yarn build # The build script
24+
FOLDER: build # The folder generated by build script
25+

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
### This action will auto deploy to target branch when it get triggered
1+
# Github-deploy-actions
2+
3+
This action will auto deploy to target branch when it get triggered
4+
5+
# How It Works
26

37
When push to `master` branch
48

@@ -8,4 +12,11 @@ Then push `build` folder as a new commit on `gh-pages` branch
812

913
> note: mark sure `build` folder is on your gitignore list
1014
11-
deploy page: [demo](https://jeoy.github.io/github-deploy-actions/)
15+
# deploy page:
16+
17+
[demo](https://jeoy.github.io/github-deploy-actions/)
18+
19+
## what exactly is done during the action
20+
21+
checkout this
22+
[shell](https://github.com/jeoy/github-deploy-actions/blob/develop/.github/actions/deploy/entrypoint.sh)

0 commit comments

Comments
 (0)