Skip to content

fix

fix #730

Workflow file for this run

# This workflow will do a clean install of node dependencies, 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:
- main
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
- run: yarn add -D firebase-tools
- run: cp configs/.firebaserc ./
- run: cp src/config/default/ownplate-dev.ts src/config/project.ts
- run: cp -ir docs/article* public/admin/docs/articles
- run: yarn install
- name: yarn build
run: yarn run build
- run: cp dist/index.html functions/templates/index.html
- name: functions yarn install, build
working-directory: ./functions
run: |
SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm_config_arch=x64 npm_config_platform=linux yarn install
- name: 'Authenticate to Google Cloud'
id: auth
uses: 'google-github-actions/auth@v2'
with:
workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.SERVICE_ACCOUNT }}
create_credentials_file: true
- name: Deploy to Firebase
run: ./node_modules/.bin/firebase deploy --project=staging
- name: slack
run: sh ./utils/buildbot.sh
env:
SLACKURL: ${{ secrets.SLACKURL }}
- name: slack failed
if: ${{ failure() }}
run: sh ./utils/faildbot.sh
env:
SLACKURL: ${{ secrets.SLACKURL }}