Skip to content

add logging (#15)

add logging (#15) #65

Workflow file for this run

name: Node.js CI
on:
push:
branches: ['main']
pull_request:
branches: ['main']
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npm run format:check
- run: npm test
deploy_staging:
runs-on: ubuntu-latest
needs: test
if: github.ref != 'refs/heads/main'
environment:
name: staging
url: https://staging.cinotify.cc/api/notify
steps:
- uses: actions/checkout@v4
- name: Deploy
run: npx wrangler deploy -e staging
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
deploy:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
environment:
name: production
url: https://www.cinotify.cc/api/notify
steps:
- uses: actions/checkout@v4
- name: Deploy
run: npx wrangler deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}