Skip to content

(fix) - Add missing environment variable for posthog api_url. Remove … #4

(fix) - Add missing environment variable for posthog api_url. Remove …

(fix) - Add missing environment variable for posthog api_url. Remove … #4

Workflow file for this run

name: Deploy
on:
push:
branches:
- master
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
environment: Production
permissions:
contents: read
deployments: write
env:
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
POSTHOG_API_URL: ${{ vars.POSTHOG_API_URL }}
steps:
- name: Create deployment status
uses: bobheadxi/deployments@v1
id: deployment
with:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
env: Production
env_url: ${{ vars.BASE_URL }}
- name: Checkout code
uses: actions/checkout@v4
# Setup cache for dependencies after account upgrade
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: npm install
- name: Deploy to Cloudflare Workers
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: |
deploy
- name: Update deployment status
uses: bobheadxi/deployments@v1
if: always()
with:
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
env: ${{ steps.deployment.outputs.env }}
env_url: ${{ vars.BASE_URL }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}