Skip to content

Commit 8fc3125

Browse files
committed
chore(pages): show deployment on PR
In order for the site to be viewable on a Pull Request, we should remove the "if:" restrictions and set the GITHUB_TOKEN.
1 parent 1f10d6c commit 8fc3125

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99

1010
permissions:
1111
contents: read
12+
deployments: write
1213

1314
concurrency:
1415
group: ${{ github.workflow }}-${{ github.ref }}
@@ -55,9 +56,10 @@ jobs:
5556
run: pnpm run build
5657

5758
- name: Deploy to Cloudflare Pages
58-
if: github.ref == 'refs/heads/develop' && github.event_name == 'push' && github.repository == 'connectbot/connectbot.github.io'
59+
if: github.repository == 'connectbot/connectbot.github.io' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
5960
uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3.14.1
6061
with:
6162
apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }}
6263
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
6364
command: pages deploy ./out --project-name=connectbot-website
65+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)