Skip to content

Update backend to bca33b1 #11

Update backend to bca33b1

Update backend to bca33b1 #11

name: Deploy Experiment app
on:
pull_request:
branches:
- main
paths:
- "packages/experiments/**"
- ".github/workflows/experiments-deploy.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
experiments-deploy-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- name: Install dependencies
shell: bash
run: npm install
- run: npm run ex:build:static
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
GA_TRACKING_ID: "G-PPE5XD2VKV"
- name: Deploy static build
id: deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_WORKERS_DEPLOY_API_TOKEN }}
workingDirectory: "packages/experiments/"
command: pages deploy "./build" --branch=${{ github.head_ref }} --project-name=hot-or-not-experiments --commit-dirty=true
env:
CLOUDFLARE_ACCOUNT_ID: "a209c523d2d9646cc56227dbe6ce3ede"
- name: "Comment on PR"
if: github.actor != 'dependabot[bot]'
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Experiments preview build: ${{ steps.deploy.outputs.previewUrl }}'
})