Skip to content

feat: 使用 github action secrets 来隐藏你的域名 #2

feat: 使用 github action secrets 来隐藏你的域名

feat: 使用 github action secrets 来隐藏你的域名 #2

Workflow file for this run

name: Deploy to Cloudflare Workers(Staging)
on:
pull_request:
branches:
- master
paths-ignore:
- '**.md'
repository_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
name: Build & Deploy
steps:
- uses: actions/checkout@v4
- name: replace your domain
command: sed -i 's_your.domain_${{ secrets.CF_BASE_DOMAIN }}_' wrangler.toml
- name: Publish
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: deploy --env staging --minify src/index.js
environment: staging