Skip to content

Add key to loaded data on edit #88

Add key to loaded data on edit

Add key to loaded data on edit #88

Workflow file for this run

# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [master]
jobs:
deploy-functions:
concurrency:
group: 'functions'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: |
package-lock.json
functions/package-lock.json
- name: Install dependencies
run: npm ci && npm ci --prefix functions
- name: "Authenticate to Google Cloud"
uses: "google-github-actions/auth@v2"
with:
credentials_json: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_KEY }}
- name: Firebase Deploy (functions)
run: npm exec -- firebase deploy --only functions
deploy-webapp:
concurrency:
group: 'web'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: |
package-lock.json
webapp/package-lock.json
- name: Install dependencies
run: npm ci && npm ci --prefix webapp
- name: "Authenticate to Google Cloud"
uses: "google-github-actions/auth@v2"
with:
credentials_json: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_KEY }}
- name: Firebase Deploy (hosting)
run: npm exec -- firebase deploy --only hosting
- name: Send deploy message to slack
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
run: |
YYYYMMDD=$(date '+%Y-%m-%d %H:%M:%S')
MESSAGE=" ☘️ Veganflora functions has been deployed at: \`${YYYYMMDD}\`"
curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"${MESSAGE}\"}" ${SLACK_WEBHOOK}