This commit is contained in:
adueck 2024-11-26 16:29:37 +05:00
parent e5bbcdf567
commit 04a0505d7f
2 changed files with 6 additions and 48 deletions

View File

@ -1,16 +1,17 @@
name: Deploy Hono Worker
name: Deploy Hono
on:
push:
branches:
- master
- main
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 60
needs: test
name: Deploy
steps:
- uses: actions/checkout@v4
- name: Build & Deploy Worker
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}

View File

@ -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