Request page build through GitHub API
This commit is contained in:
parent
71abc70100
commit
d673ba2d15
|
@ -12,6 +12,9 @@ LABEL version="$VERSION" \
|
|||
"com.github.actions.icon"="upload-cloud" \
|
||||
"com.github.actions.color"="green"
|
||||
|
||||
RUN apk --update --no-cache add curl \
|
||||
&& rm -rf /var/cache/apk/* /tmp/*
|
||||
|
||||
COPY LICENSE README.md /
|
||||
ADD entrypoint.sh /
|
||||
ENTRYPOINT [ "/entrypoint.sh" ]
|
||||
|
|
|
@ -18,8 +18,5 @@ inputs:
|
|||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
||||
args:
|
||||
- ${{ inputs.target_branch }}
|
||||
- ${{ inputs.build_dir }}
|
||||
env:
|
||||
GITHUB_TOKEN: 'As provided by GitHub Actions'
|
||||
|
|
|
@ -21,5 +21,7 @@ git commit --allow-empty -m 'Deploy to GitHub pages'
|
|||
git push --force --quiet https://${GITHUB_PAT:-"x-access-token:$GITHUB_TOKEN"}@github.com/${GITHUB_REPOSITORY}.git master:${INPUT_TARGET_BRANCH}
|
||||
rm -rf .git
|
||||
|
||||
curl -XPOST -H"Authorization: token ${GITHUB_TOKEN}" -H"Accept: application/vnd.github.mister-fantastic-preview+json" https://api.github.com/repos/${GITHUB_REPOSITORY}/pages/builds
|
||||
|
||||
cd "$GITHUB_WORKSPACE"
|
||||
echo "🎉 Content of $INPUT_BUILD_DIR has been deployed to GitHub Pages."
|
||||
|
|
Loading…
Reference in New Issue
Block a user