oops #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |