Skip to content

feat: add fetch method to return 404 response in ArkSshConnector #5

feat: add fetch method to return 404 response in ArkSshConnector

feat: add fetch method to return 404 response in ArkSshConnector #5

Workflow file for this run

name: CI/CD
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
concurrency:
group: workers-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
- name: Type-check and build
run: npm run ci
- name: Upload Worker bundle
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v7
with:
name: worker-bundle
path: dist/worker.js
if-no-files-found: error
deploy:
name: Deploy Worker
runs-on: ubuntu-latest
needs: ci
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
- name: Download Worker bundle
uses: actions/download-artifact@v8
with:
name: worker-bundle
path: dist
- name: Check Cloudflare credentials
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: |
test -n "$CLOUDFLARE_API_TOKEN"
test -n "$CLOUDFLARE_ACCOUNT_ID"
- name: Deploy to Cloudflare Workers
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: npx wrangler deploy