34 lines
844 B
YAML
34 lines
844 B
YAML
name: Build and deploy
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Prepare environment
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
|
|
- name: Install deps
|
|
run: npm install
|
|
|
|
- name: Build plugin(s) and site
|
|
run: npm run build
|
|
|
|
- name: Install API deps
|
|
working-directory: api
|
|
run: npm install
|
|
|
|
- name: Deploy to Cloudflare Workers
|
|
working-directory: api
|
|
env:
|
|
CLOUDFLARE_API_KEY: ${{ secrets.CLOUDFLARE_API_KEY }}
|
|
CLOUDFLARE_EMAIL: ${{ secrets.CLOUDFLARE_EMAIL }}
|
|
run: npx wrangler deploy
|