Skip to content

Commit

Permalink
Added deploy preview app workflow (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
lempira authored Nov 8, 2024
1 parent f785c21 commit 9b5d8c4
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/preview-app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy Preview App

on:
pull_request:

jobs:
deploy-preview:
runs-on: ubuntu-latest
name: Deploy Preview App

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Build dist
run: mv .env.sample .env && npm install && npm run build

- name: Deploy to Cloudflare Pages
id: deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: pages deploy dist --project-name=algokit-lora --branch=${{ github.head_ref }}

- name: Print URL
env:
DEPLOYMENT_ALIAS_URL: ${{ steps.deploy.outputs.pages-deployment-alias-url }}
run: echo $DEPLOYMENT_ALIAS_URL

0 comments on commit 9b5d8c4

Please sign in to comment.