Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy Worker

on:
push:
branches: [main]
paths:
- 'worker/**'
- 'package.json'
- 'package-lock.json'

jobs:
deploy:
name: Deploy to Cloudflare Workers
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: 'package.json'
- name: Cache npm
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm install
- name: Deploy worker
run: npm -w worker run deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
38 changes: 20 additions & 18 deletions .github/workflows/lint-build.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
name: CI
name: Lint and Build

on:
pull_request:
branches: [main]
push:
branches: [main]

jobs:
build:
lint-and-build:
name: Frontend & Worker — lint and build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: package.json

node-version-file: 'package.json'
- name: Cache npm
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm install

- name: Lint frontend
run: npm run lint -w frontend
continue-on-error: true

run: npm -w frontend run lint
- name: Lint worker
run: npm -w worker run lint
- name: Build frontend
run: npm run build -w frontend
continue-on-error: true

run: npm -w frontend run build
- name: Build worker
run: npm run build -w worker
continue-on-error: true
run: npm -w worker run build
Loading