Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utilise GITHUB_TOKEN to commit to gh-pages and deploy #9

Merged
merged 1 commit into from
Mar 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ jobs:
- name: Generate report
run: bash ./run.sh
- name: Deploy GitHub pages

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I ask whether the original personal access token will work after making this change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we don't want to use the personal access token in GitHub Actions as the GitHub token is sufficient.

run: |
export TOKEN=${{ secrets.ACCESS_TOKEN }}
export DEPLOY_KEY=${{ secrets.DEPLOY_KEY }}
source ./configs/github.sh
source ./configs/deploy.sh
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./reposense-report
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: Rebuild pages at