-
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (77 loc) · 2.42 KB
/
deploy-configs.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: mono-repo [deploy - configs]
run-name: Deploy to Development by @${{ github.actor }} on ${{github.ref_name }}
on:
workflow_dispatch:
jobs:
main:
name: Build & Bundle
environment: Development
runs-on: ubuntu-latest
permissions:
contents: write
actions: read
discussions: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://npm.pkg.github.com
scope: ${{github.repository_owner}}
cache: 'npm'
- uses: nrwl/nx-set-shas@v3
- run: |
echo "BASE: ${{ env.NX_BASE }}"
echo "HEAD: ${{ env.NX_HEAD }}"
- run: npm ci
- name: Build Projects and Library
run: npx nx build acf-configs --prod --verbose
env:
NX_PUBLIC_FIREBASE_API_KEY: ${{vars.NX_PUBLIC_FIREBASE_API_KEY}}
NX_PUBLIC_FIREBASE_DATABASE_URL: ${{vars.NX_PUBLIC_FIREBASE_DATABASE_URL}}
NX_PUBLIC_FIREBASE_PROJECT_ID: ${{vars.NX_PUBLIC_FIREBASE_PROJECT_ID}}
NX_PUBLIC_FIREBASE_BUCKET: ${{vars.NX_PUBLIC_FIREBASE_BUCKET}}
NX_PUBLIC_FIREBASE_AUTH_DOMAIN: ${{vars.NX_PUBLIC_FIREBASE_AUTH_DOMAIN}}
- name: Print Environment Info
run: npx nx report
- name: Bundle Projects
run: |
mkdir bundle
cd dist/apps/acf-configs
zip -r ../../../bundle/acf-configs-${{vars.NX_PUBLIC_VARIANT}}.zip .
cd ..
- uses: actions/upload-artifact@v4
id: artifact-upload-step
with:
name: nx-main-artifacts
path: |
bundle/*
firebase.json
.firebaserc
config:
name: Deploy Config
needs: [main]
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
environment:
name: Development
url: https://configs.getautoclicker.com
steps:
- uses: actions/download-artifact@v4
with:
name: nx-main-artifacts
- name: unzip
run: unzip bundle/acf-configs-${{vars.NX_PUBLIC_VARIANT}}.zip -d acf-configs
- name: Files
run: ls -la
- name: Build And Deploy
id: deploy
uses: FirebaseExtended/action-hosting-deploy@v0
with:
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}'
projectId: auto-clicker-autofill
channelId: live