Skip to content

Commit

Permalink
Merge pull request #68 from clue-labs/build
Browse files Browse the repository at this point in the history
Update to use `PAT` to avoid rate limits and update build environment
  • Loading branch information
WyriHaximus committed Feb 9, 2024
2 parents d392c79 + e2ae3d7 commit 0e29f8c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ on:

jobs:
Deploy:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: 7.1
- run: composer install
- run: mkdir ~/.ssh && echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_rsa && chmod 400 ~/.ssh/id_rsa
- run: echo 'GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}"' > .env && cat .env.dist >> .env
- run: echo 'GITHUB_TOKEN="${{ secrets.PAT || secrets.GITHUB_TOKEN }}"' > .env && cat .env.dist >> .env
- run: git config --global user.name "GitHub Actions" && git config --global user.email "actions@github.com"
- run: bin/build
- run: bin/build --deploy --no-component-update
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Website

[![CI status](https://github.com/reactphp/website/actions/workflows/ci.yml/badge.svg)](https://github.com/reactphp/website/actions)
![Last deployed](https://img.shields.io/github/last-commit/reactphp/reactphp.github.io?label=last%20deployed&logo=github)
[![Last deployed](https://img.shields.io/github/last-commit/reactphp/reactphp.github.io?label=last%20deployed&logo=github)](https://github.com/reactphp/reactphp.github.io)

Source code of reactphp.org.

Expand Down Expand Up @@ -79,6 +79,10 @@ deployment script (see previous chapter).
> Make sure the required `DEPLOY_KEY` secret is set in the repository settings on GitHub.
> See [action documentation](https://github.com/JamesIves/github-pages-deploy-action#using-an-ssh-deploy-key-)
> for more details.
> On top of this, you're recommended to add a [personal access token](https://github.com/settings/tokens)
> as a repository secret with the name `PAT` to avoid running into secondary rate limits.
> If this secret is not found, it will fall back to the automatic `GITHUB_TOKEN`
> secret, which may cause the build to fail occasionally.
## License

Expand Down

0 comments on commit 0e29f8c

Please sign in to comment.