Skip to content

database_updated

database_updated #4726

Workflow file for this run

name: Deploy to Firebase Hosting
on:
workflow_dispatch:
repository_dispatch:
types: [strapi_updated, database_updated]
push:
branches:
- master
concurrency:
group: prod
jobs:
build_and_preview:
runs-on: ubuntu-2004-large
steps:
- env:
MESSAGE: ${{ toJson(github.event.client_payload) }}
run: echo PAYLOAD $MESSAGE
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 20
- uses: actions/setup-node@v1
with:
node-version: '18.x'
- name: Caching
id: gatsby-cache-build
uses: actions/cache@v2
with:
path: |
node_modules
key: ${{ runner.os }}-gatsby-build-prod-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-gatsby-build-prod-
- run: yarn install
- name: Run ESLint
run: yarn lint
env:
CI: true
- name: Run Prettier
run: yarn format
env:
CI: true
- run: yarn run build --log-pages
env:
CI: true
STRAPI_API_URL: ${{ secrets.STRAPI_API_URL }}
STRAPI_TOKEN: ${{ secrets.STRAPI_TOKEN }}
GATSBY_DB_USER: ${{ secrets.GATSBY_DB_USER }}
GATSBY_DB_PASS: ${{ secrets.GATSBY_DB_PASS }}
GATSBY_DB_HOST: ${{ secrets.GATSBY_DB_HOST }}
GATSBY_DB_PORT: ${{ secrets.GATSBY_DB_PORT }}
GATSBY_DB_NAME: ${{ secrets.GATSBY_DB_NAME }}
- name: run Lighthouse CI
run: |
# Need to set these manually LHCI doesn't support multiple builds
export LHCI_BUILD_CONTEXT__COMMIT_MESSAGE=$(git log --format=%s -n 1 HEAD)
export LHCI_BUILD_CONTEXT__AUTHOR=$(git log --format="$aN <%aE>" -n 1 HEAD)
export LHCI_BUILD_CONTEXT__COMMIT_TIME=$(git log -n1 --pretty="%cI" HEAD)
npm install -g @lhci/[email protected]
lhci autorun
env:
LHCI_BUILD_CONTEXT__CURRENT_HASH: ${{ github.sha }}-${{ github.run_id }}
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
LHCI_TOKEN: ${{ secrets.LHCI_TOKEN }}
LHCI_BASIC_AUTH_USERNAME: ${{ secrets.LHCI_BASIC_AUTH_USERNAME }}
LHCI_BASIC_AUTH_PASSWORD: ${{ secrets.LHCI_BASIC_AUTH_PASSWORD }}
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}'
expires: 30d
projectId: estuary-marketing
channelId: live