Skip to content

Commit

Permalink
feat: support GITHUB_TOKEN (#29)
Browse files Browse the repository at this point in the history
The GITHUB_TOKEN is an automatically generated secret that lets you make authenticated calls to the GitHub API in your workflow runs.

See here: https://docs.github.com/en/actions/security-guides/automatic-token-authentication

Co-authored-by: Chris Nicholson <datapolitical@users.noreply.github.com>
Co-authored-by: JT <jeffreytse.mail@gmail.com>
  • Loading branch information
3 people authored Oct 6, 2021
1 parent 4b6a709 commit 4d5e358
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ jobs:
- uses: ./
with:
provider: 'github'
token: ${{ secrets.GH_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
jekyll_src: './test_site'
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ COPY script /script
COPY providers /providers
COPY entrypoint.sh /

ENTRYPOINT ["/entrypoint.sh"]
ENTRYPOINT ["/entrypoint.sh"]
4 changes: 2 additions & 2 deletions providers/github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ touch .nojekyll
[ -n "$INPUT_CNAME" ] && echo "$INPUT_CNAME" > CNAME

echo "Deploying to ${REPOSITORY} on branch ${BRANCH}"
echo "Deploying to https://${TOKEN}@github.com/${REPOSITORY}.git"
echo "Deploying to https://${ACTOR}:${TOKEN}@github.com/${REPOSITORY}.git"

REMOTE_REPO="https://${TOKEN}@github.com/${REPOSITORY}.git" && \
REMOTE_REPO="https://${ACTOR}:${TOKEN}@github.com/${REPOSITORY}.git" && \
git init && \
git config user.name "${ACTOR}" && \
git config user.email "${ACTOR}@users.noreply.github.com" && \
Expand Down

0 comments on commit 4d5e358

Please sign in to comment.