mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Changing order
This commit is contained in:
parent
f8625bcad8
commit
24bc61ee6d
@ -40,6 +40,9 @@ git init && \
|
||||
git config --global user.email "${COMMIT_EMAIL}" && \
|
||||
git config --global user.name "${COMMIT_NAME}" && \
|
||||
|
||||
## Initializes the repository path using the access token.
|
||||
REPOSITORY_PATH="https://${ACCESS_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" && \
|
||||
|
||||
# Checks to see if the remote exists prior to deploying.
|
||||
# If the branch doesn't exist it gets created here as an orphan.
|
||||
if [ `git ls-remote --heads "https://${ACCESS_TOKEN}@github.com:JamesIves/reddit-viewer.git" $BRANCH | wc -l` ]
|
||||
@ -50,16 +53,12 @@ then
|
||||
touch README.md && \
|
||||
git add README.md && \
|
||||
git commit -m "Initial ${BRANCH} commit" && \
|
||||
git push origin $BRANCH
|
||||
git push $REPOSITORY_PATH $BRANCH
|
||||
fi
|
||||
|
||||
# Checks out the base branch to begin the deploy process.
|
||||
git checkout "${BASE_BRANCH:-master}" && \
|
||||
|
||||
## Initializes the repository path using the access token.
|
||||
REPOSITORY_PATH="https://${ACCESS_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" && \
|
||||
|
||||
|
||||
# Builds the project if a build script is provided.
|
||||
echo "Running build scripts... $BUILD_SCRIPT" && \
|
||||
eval "$BUILD_SCRIPT" && \
|
||||
|
Loading…
Reference in New Issue
Block a user