mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Adding BUILD_SCRIPT
This commit is contained in:
parent
5d6a169159
commit
0094c660b2
@ -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 &&
|
||||||
|
Loading…
Reference in New Issue
Block a user