Create deploy-qa.yaml
All checks were successful
Deploy FitLien services to Dev / Deploy to Dev (push) Successful in 2m9s
All checks were successful
Deploy FitLien services to Dev / Deploy to Dev (push) Successful in 2m9s
This commit is contained in:
parent
3f3bf53e94
commit
59c4f88ff0
64
.gitea/workflows/deploy-qa.yaml
Normal file
64
.gitea/workflows/deploy-qa.yaml
Normal file
@ -0,0 +1,64 @@
|
||||
name: Deploy FitLien services to Dev
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- qa
|
||||
jobs:
|
||||
deploy:
|
||||
name: Deploy to QA
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Clean install
|
||||
run: npm clean-install
|
||||
|
||||
- name: Copy .env.example to .env
|
||||
run: cp functions/.env.example functions/.env
|
||||
|
||||
- name: Replace variables in .env
|
||||
run: |
|
||||
sed -i "s/#{TWILIO_ACCOUNT_SID}#/${{ secrets.TWILIO_ACCOUNT_SID }}/" functions/.env
|
||||
sed -i "s/#{TWILIO_AUTH_TOKEN}#/${{ secrets.TWILIO_AUTH_TOKEN }}/" functions/.env
|
||||
sed -i "s/#{TWILIO_PHONE_NUMBER}#/${{ secrets.TWILIO_PHONE_NUMBER }}/" functions/.env
|
||||
sed -i "s/#{SERVICES_RGN}#/${{ vars.SERVICES_RGN }}/" functions/.env
|
||||
sed -i "s/#{GOOGLE_MAPS_API_KEY}#/${{ secrets.GOOGLE_MAPS_API_KEY }}/" functions/.env
|
||||
sed -i "s/#{SES_FROM_EMAIL}#/${{ vars.SES_FROM_EMAIL }}/" functions/.env
|
||||
sed -i "s/#{SES_REPLY_TO_EMAIL}#/${{ vars.SES_REPLY_TO_EMAIL }}/" functions/.env
|
||||
sed -i "s/#{AWS_ACCESS_KEY_ID}#/${{ secrets.AWS_ACCESS_KEY_ID }}/" functions/.env
|
||||
sed -i "s/#{AWS_SECRET_ACCESS_KEY}#/${{ secrets.AWS_SECRET_ACCESS_KEY }}/" functions/.env
|
||||
sed -i "s/#{AWS_REGION}#/${{ secrets.AWS_REGION }}/" functions/.env
|
||||
sed -i "s/#{PHONEPE_CLIENT_ID}#/${{ secrets.PHONEPE_CLIENT_ID }}/" functions/.env
|
||||
sed -i "s/#{PHONEPE_CLIENT_SECRET}#/${{ secrets.PHONEPE_CLIENT_SECRET }}/" functions/.env
|
||||
sed -i "s/#{PHONEPE_API_URL}#/${{ secrets.PHONEPE_API_URL }}/" functions/.env
|
||||
sed -i "s/#{PHONEPE_WEBHOOK_USERNAME}#/${{ secrets.PHONEPE_WEBHOOK_USERNAME }}/" functions/.env
|
||||
sed -i "s/#{PHONEPE_WEBHOOK_PASSWORD}#/${{ secrets.PHONEPE_WEBHOOK_PASSWORD }}/" functions/.env
|
||||
|
||||
cat functions/.env
|
||||
- name: "Replace #{SERVICES_RGN}# in all .ts files"
|
||||
run: |
|
||||
find . -type f -name "*.ts" -exec sed -i "s/#{SERVICES_RGN}#/${{ vars.SERVICES_RGN }}/g" {} +
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
npm install -g typescript
|
||||
cd functions
|
||||
npm install
|
||||
npx tsc
|
||||
cd ..
|
||||
ls -la
|
||||
|
||||
- name: Deploy
|
||||
run: |
|
||||
curl -sL firebase.tools | upgrade=true bash
|
||||
firebase use --token ${{ secrets.FIREBASE_TOKEN }} qa
|
||||
firebase deploy --token "${{ secrets.FIREBASE_TOKEN }}" --force --non-interactive
|
||||
Loading…
Reference in New Issue
Block a user