Skip to content

Commit

Permalink
Merge pull request #297 from mstable/ci/github-actions
Browse files Browse the repository at this point in the history
ci: update lts and yield apps github actions
  • Loading branch information
dimlbc authored Nov 27, 2023
2 parents 8f39c14 + 6d58d05 commit 61d3ce0
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lts-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_FRONTEND_7E17F }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_APPS_LTS }}'
expires: 30d
projectId: apps-lts
channelId: dev
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/lts-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
name: Setup node
with:
node-version: 16
cache: "yarn"
cache: 'yarn'

- name: Install jq
run: |
Expand All @@ -35,16 +35,20 @@ jobs:
alchemyFallback: ${{ secrets.ALCHEMY_FALLBACK_API_KEY }}
run: NX_ALCHEMY_MAIN_API_KEY=$alchemyMain NX_ALCHEMY_FALLBACK_API_KEY=$alchemyFallback yarn nx build lts

- name: Copy Firebase LTS to Firebase
run: cp firebase.lts.json firebase.json

- name: Firebase deploy
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN_FRONTEND_7E17F }}
run: |
yarn firebase use lts
yarn firebase deploy -c firebase.lts.json --only hosting
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_APPS_LTS }}'
projectId: apps-lts
channelId: live

- name: Discord notification
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@0.3.2
with:
args: "✅ New PROD version of LTS 🚀 Deploy url: https://withdraw.mstable.org"
args: '✅ New PROD version of LTS 🚀 Deploy url: https://withdraw.mstable.org'
2 changes: 1 addition & 1 deletion .github/workflows/lts-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ jobs:
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_FRONTEND_7E17F }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_APPS_LTS }}'
expires: 8d
projectId: apps-lts
26 changes: 15 additions & 11 deletions .github/workflows/mstable-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ on:
branches:
- main
paths:
- "apps/mstable/**"
- "libs/mstable/**"
- "libs/shared/**"
- 'apps/mstable/**'
- 'libs/mstable/**'
- 'libs/shared/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -29,8 +29,8 @@ jobs:
- uses: actions/setup-node@v3
name: Setup node
with:
node-version: 16
cache: "yarn"
node-version: 18
cache: 'yarn'

- name: Install jq
run: |
Expand All @@ -46,13 +46,17 @@ jobs:
alchemyFallback: ${{ secrets.ALCHEMY_FALLBACK_API_KEY }}
run: NX_ALCHEMY_MAIN_API_KEY=$alchemyMain NX_ALCHEMY_FALLBACK_API_KEY=$alchemyFallback yarn nx build mstable

- name: Firebase deploy
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN_FRONTEND_7E17F }}
run: |
yarn firebase use mstable
yarn firebase hosting:channel:deploy dev -c ./firebase.mstable.json --expires 30d
- name: Copy Firebase mStable to Firebase
run: cp firebase.mstable.json firebase.json

- name: Firebase deploy
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_FRONTEND_7E17F }}'
expires: 30d
projectId: frontend-7e17f
channelId: dev
# - name: Discord notification
# env:
# DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/mstable-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
- uses: actions/setup-node@v3
name: Setup node
with:
node-version: 16
cache: "yarn"
node-version: 18
cache: 'yarn'

- name: Install jq
run: |
Expand All @@ -37,16 +37,20 @@ jobs:
alchemyFallback: ${{ secrets.ALCHEMY_FALLBACK_API_KEY }}
run: NX_THE_GRAPH_MV_MAINNET_URL=$mainnet NX_THE_GRAPH_MV_GOERLI_URL=$goerli NX_ALCHEMY_MAIN_API_KEY=$alchemyMain NX_ALCHEMY_FALLBACK_API_KEY=$alchemyFallback yarn nx build mstable

- name: Copy Firebase mStable to Firebase
run: cp firebase.mstable.json firebase.json

- name: Firebase deploy
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN_FRONTEND_7E17F }}
run: |
yarn firebase use mstable
yarn firebase deploy -c firebase.mstable.json --only hosting
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_FRONTEND_7E17F }}'
projectId: frontend-7e17f
channelId: live

- name: Discord notification
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@0.3.2
with:
args: "✅ New PROD version of mStable Vaults 🚀 Deploy url: https://yield.mstable.org"
args: '✅ New PROD version of mStable Vaults 🚀 Deploy url: https://yield.mstable.org'

0 comments on commit 61d3ce0

Please sign in to comment.