-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (34 loc) · 1.08 KB
/
preview.yaml
File metadata and controls
36 lines (34 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Deploy PR Preview
on: pull_request
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
- name: Install Dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: Deploy
id: deploy
uses: cloudflare/wrangler-action@v3
with:
wranglerVersion: 4.65.0
packageManager: pnpm
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
command: versions upload --assets ./dist --name compio-website-2 --latest
- name: Comment PR
uses: thollander/actions-comment-pull-request@v3
with:
comment-tag: preview-deployed
message: |
**Preview Deployed!**
Your changes have been deployed to a preview environment. You can view it here: ${{ steps.deploy.outputs.deployment-url }}