Merge pull request #776 from CareTogether/family-screen-v2 #300
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Docs for the Azure Web Apps Deploy action: https://go.microsoft.com/fwlink/?linkid=2134798 | |
# More GitHub Actions for Azure: https://go.microsoft.com/fwlink/?linkid=2135048 | |
name: CD - Production - React SPA | |
concurrency: | |
group: continuous_delivery_spa | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'src/caretogether-pwa/**' | |
- '.github/workflows/cd-prod-react.yml' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repo | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
# Build React frontend | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
cache: 'npm' | |
cache-dependency-path: src/caretogether-pwa | |
- name: Install NPM packages | |
run: npm ci | |
working-directory: src/caretogether-pwa | |
- name: Build React app | |
run: npm run build | |
working-directory: src/caretogether-pwa | |
- name: List build outputs | |
run: ls -R dist | |
working-directory: src/caretogether-pwa | |
# Deploy React frontend | |
- name: Deploy React PWA to Azure | |
uses: azure/webapps-deploy@v2 | |
with: | |
app-name: 'caretogether-pwa' | |
slot-name: 'production' | |
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_CARETOGETHER_PWA }} | |
package: src/caretogether-pwa/dist |