Skip to content

chore: update redirect links (#1031) #752

chore: update redirect links (#1031)

chore: update redirect links (#1031) #752

Workflow file for this run

name: Deploy Worker
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
jobs:
deploy:
name: Deploy Cloudflare Worker
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
with:
egress-policy: block
allowed-endpoints: >
sparrow.cloudflare.com:443
api.cloudflare.com:443
api.github.com:443
github.com:443
hooks.slack.com:443
registry.npmjs.org:443
sentry.io:443
us.sentry.io:443
release-assets.githubusercontent.com:443
- name: Git Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: lts/*
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Deploy to Staging
if: github.event_name == 'push'
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
run: node --run deploy:staging
- name: Deploy to Production
if: github.event_name == 'workflow_dispatch'
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
run: node --run deploy:prod
- name: Upload Source Maps to Sentry
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: nodejs-org
SENTRY_PROJECT: ${{ (github.event_name == 'workflow_dispatch' && 'dist-worker-prod') || 'dist-worker-staging' }}
run: ./scripts/upload-sourcemaps.sh
- name: Alert on Failure
if: failure() && github.repository == 'nodejs/release-cloudflare-worker'
uses: rtCamp/action-slack-notify@33ca3be66c6f378fe1610fd1d5258632dbed5e58 # 2.4.0
env:
SLACK_COLOR: '#DE512A'
SLACK_ICON: https://github.com/nodejs.png?size=48
SLACK_TITLE: Deployment failed (${{ github.ref }})
SLACK_MESSAGE: A deployment of the Release Worker has failed.
SLACK_USERNAME: nodejs-bot
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}