Skip to content

Pass in Node version #6

Pass in Node version

Pass in Node version #6

Workflow file for this run

name: "Test and Deploy Worker"
on:
push:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
node-version: [ 20 ]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/run-tests
with:
node-version: ${{ matrix.node-version }}
# # Install Node
# - name: Setup Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}
# cache: "npm"
# - name: Confirm installed Node version
# run: node -v
# - name: Install dependencies
# run: npm ci
# - name: Run tests
# run: npm run test
deploy:
runs-on: ubuntu-latest
timeout-minutes: 60
needs: test
steps:
- uses: actions/checkout@v4
- name: Build & Deploy Worker
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}