ci: deploy to worker #18
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: | |
| 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 }} |