[chore] Upgrade dependencies #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
tags: | |
- "[0-9]+.[0-9]+.[0-9]+" | |
pull_request: | |
branches: [main] | |
permissions: | |
contents: read | |
jobs: | |
audit: | |
name: Audit | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: 'npm' | |
- name: Install Dependencies | |
run: npm ci | |
- name: Run Audit | |
run: npm audit --omit=dev --audit-level=moderate | |
verify: | |
name: Verify | |
runs-on: ubuntu-latest | |
needs: [audit] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: 'npm' | |
- name: Install Dependencies | |
run: npm ci | |
- name: Run Lint | |
run: npm run lint | |
- name: Run Types | |
run: npm run types | |
- name: Validate Wrangler Config | |
run: test -f wrangler.toml | |
- name: Dry run deploy | |
run: npx wrangler deploy --dry-run | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
needs: [verify] | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Deploy to Cloudflare Workers | |
run: npx wrangler deploy | |
env: | |
CLOUDFLARE_API_TOKEN: ${{ secrets.TRIFROST_CLOUDFLARE_CI }} |