mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Update entrypoint.sh
This commit is contained in:
parent
a2c3f4b943
commit
9599d53b6d
@ -46,6 +46,7 @@ REMOTE_BRANCH = `git ls-remote --heads "https://${ACCESS_TOKEN}@github.com:James
|
|||||||
# If the branch doesn't exist it gets created here as an orphan.
|
# If the branch doesn't exist it gets created here as an orphan.
|
||||||
if [[ -z $REMOTE_BRANCH ]]
|
if [[ -z $REMOTE_BRANCH ]]
|
||||||
then
|
then
|
||||||
|
echo "Creating remote branch ${BRANCH} as it doesn't exist..."
|
||||||
git checkout --orphan $BRANCH && \
|
git checkout --orphan $BRANCH && \
|
||||||
git rm -rf . && \
|
git rm -rf . && \
|
||||||
touch README.md && \
|
touch README.md && \
|
||||||
@ -70,4 +71,4 @@ echo "Deploying to GitHub..." && \
|
|||||||
git add -f $FOLDER && \
|
git add -f $FOLDER && \
|
||||||
git commit -m "Deploying to ${BRANCH} - $(date +"%T")" && \
|
git commit -m "Deploying to ${BRANCH} - $(date +"%T")" && \
|
||||||
git push $REPOSITORY_PATH `git subtree split --prefix $FOLDER master`:$BRANCH --force && \
|
git push $REPOSITORY_PATH `git subtree split --prefix $FOLDER master`:$BRANCH --force && \
|
||||||
echo "Deployment Succesful!"
|
echo "Deployment succesful!"
|
Loading…
Reference in New Issue
Block a user