Skip to content

Merge pull request #262 from DFXswiss/develop #143

Merge pull request #262 from DFXswiss/develop

Merge pull request #262 from DFXswiss/develop #143

Workflow file for this run

name: PRD CI/CD
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build:
name: Build and deploy to PRD
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login
uses: azure/login@v1
with:
creds: ${{ secrets.PRD_CREDENTIALS }}
- name: Node setup
uses: actions/setup-node@v3
with:
node-version: 14.x
- name: Expo setup
uses: expo/expo-github-action@v7
with:
expo-version: 4.x
- name: Install packages
run: npm install
- name: Optimize assets
run: npx expo-optimize
# fix --release-channel not available for web yet
- name: Select environment
run: cp -f app/env/Environment.prd.ts app/env/Environment.ts
- name: Build for web
run: expo build:web
- name: Deploy to Azure Storage (PRD)
uses: azure/CLI@v1
with:
inlineScript: |
az storage blob upload-batch --account-name stdfxpayprd -d '$web' -s ./web-build --overwrite
- name: Purge CDN endpoint (PRD)
uses: azure/CLI@v1
with:
inlineScript: |
az cdn endpoint purge --content-paths "/*" --profile-name cdnp-dfx-pay-prd --name cdne-dfx-pay-prd --resource-group rg-dfx-pay-prd
- name: Logout
run: |
az logout
if: always()