This commit is contained in:
parent
e5bbcdf567
commit
04a0505d7f
|
@ -1,16 +1,17 @@
|
||||||
name: Deploy Hono Worker
|
name: Deploy Hono
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 60
|
name: Deploy
|
||||||
needs: test
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Build & Deploy Worker
|
- name: Deploy
|
||||||
uses: cloudflare/wrangler-action@v3
|
uses: cloudflare/wrangler-action@v3
|
||||||
with:
|
with:
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
name: Functions CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
paths:
|
|
||||||
- "functions/**"
|
|
||||||
- ".github/workflows/functions-ci.yml"
|
|
||||||
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-serve-functions:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
LINGDOCS_NPM_TOKEN: ${{ secrets.LINGDOCS_NPM_TOKEN }}
|
|
||||||
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
cache: "npm"
|
|
||||||
- run: npm install -g firebase-tools
|
|
||||||
- name: build functions
|
|
||||||
run: |
|
|
||||||
cp .npmrc functions
|
|
||||||
cd website
|
|
||||||
npm install
|
|
||||||
cd ..
|
|
||||||
cd functions
|
|
||||||
npm install
|
|
||||||
npm run build
|
|
||||||
- name: start up emulator once
|
|
||||||
run: |
|
|
||||||
cd functions
|
|
||||||
firebase functions:config:get --token ${FIREBASE_TOKEN} > .runtimeconfig.json
|
|
||||||
echo '#!/bin/bash' > empty.sh
|
|
||||||
chmod +x empty.sh
|
|
||||||
firebase emulators:exec ./empty.sh --only functions --token ${FIREBASE_TOKEN}
|
|
||||||
rm .runtimeconfig.json
|
|
||||||
rm empty.sh
|
|
Loading…
Reference in New Issue