Adding BUILD_SCRIPT

This commit is contained in:
James Ives 2019-03-03 10:05:36 -05:00 committed by GitHub
parent 5d6a169159
commit 0094c660b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,13 +1,13 @@
#!/bin/sh -l #!/bin/sh -l
if [ -z "$BRANCH" ] if [ -z "$BRANCH" ]
then then
echo "Which branch should this push to?" echo "You must provide the action with a branch name."
exit 1 exit 1
fi fi
if [ -z "$FOLDER" ] if [ -z "$FOLDER" ]
then then
echo "Which folder should this push to?" echo "You must provide the action with the folder name in the repository where your compiled page lives."
fi fi
# Installs Git. # Installs Git.
@ -21,11 +21,10 @@ cd $GITHUB_WORKSPACE && \
git config --global user.email "${COMMIT_EMAIL:-gh-pages-deploy@jives.dev}" && \ git config --global user.email "${COMMIT_EMAIL:-gh-pages-deploy@jives.dev}" && \
git config --global user.name "${COMMIT_NAME:-Github Pages Deploy}" && \ git config --global user.name "${COMMIT_NAME:-Github Pages Deploy}" && \
git checkout master && \ git checkout master && \
git push $GITHUB_REPOSITORY $BRANCH:$BRANCH git push $GITHUB_REPOSITORY $BRANCH:$BRANCH && \
# Builds the project. # Builds the project.
npm install && \ $BUILD_SCRIPT && \
npm run-script build && \
# Commits the data to Github. # Commits the data to Github.
git add -f $FOLDER && git add -f $FOLDER &&