From e2ae3d7c20db70b92d9cb609ae4d46a22a978b97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Sat, 16 Sep 2023 13:27:19 +0200 Subject: [PATCH] Update to use `PAT` to avoid rate limits and update build environment --- .github/workflows/ci.yml | 6 +++--- README.md | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b3c351b..aac2106d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/README.md b/README.md index b64a4d22..cae7e4e4 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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