-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (51 loc) · 1.58 KB
/
deploy-prod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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@v2
with:
fetch-depth: 0
- 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
- 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 }}
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
expires: 30d
projectId: estuary-marketing
channelId: live