Update Logos #34
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://github.com/Azure/webapps-deploy | |
# More GitHub Actions for Azure: https://github.com/Azure/actions | |
name: Build and Deploy to Azure | |
on: | |
push: | |
branches: | |
- release | |
workflow_dispatch: | |
env: | |
NODE_ENV: production | |
jobs: | |
build-base: | |
name: Build Base | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Upload | |
uses: actions/upload-artifact@v3 | |
with: | |
name: node-app | |
path: package.json | |
build-client: | |
name: Build Client | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./client | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Node 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
cache: 'npm' | |
cache-dependency-path: '**/client/package-lock.json' | |
- name: Install | |
run: npm ci | |
- name: Build | |
run: npm run build | |
env: | |
REACT_APP_AUTH0_AUDIENCE: ${{ secrets.REACT_APP_AUTH0_AUDIENCE }} | |
REACT_APP_AUTH0_DOMAIN: ${{ secrets.REACT_APP_AUTH0_DOMAIN }} | |
REACT_APP_AUTH0_CLIENT_ID: ${{ secrets.REACT_APP_AUTH0_CLIENT_ID }} | |
- name: Upload | |
uses: actions/upload-artifact@v3 | |
with: | |
name: client-build | |
path: client/build | |
build-server: | |
name: Build Server | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./server | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Node 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
cache: 'npm' | |
cache-dependency-path: '**/server/package-lock.json' | |
- name: Install | |
run: npm ci | |
- name: Build | |
run: npm run build | |
env: | |
REACT_APP_AUTH0_AUDIENCE: ${{ secrets.REACT_APP_AUTH0_AUDIENCE }} | |
REACT_APP_AUTH0_DOMAIN: ${{ secrets.REACT_APP_AUTH0_DOMAIN }} | |
AUTH0_API_CLIENT_ID: ${{ secrets.AUTH0_API_CLIENT_ID }} | |
AUTH0_API_CLIENT_SECRET: ${{ secrets.AUTH0_API_CLIENT_SECRET }} | |
DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
- name: Upload | |
uses: actions/upload-artifact@v3 | |
with: | |
name: server-build | |
path: server/build | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
needs: [build-base, build-client, build-server] | |
environment: | |
name: 'Production' | |
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} | |
steps: | |
- name: Download App Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: node-app | |
- name: Download Client | |
uses: actions/download-artifact@v3 | |
with: | |
name: client-build | |
path: client/build | |
- name: Download Server | |
uses: actions/download-artifact@v3 | |
with: | |
name: server-build | |
path: server/build | |
- name: Deploy to Azure | |
id: deploy-to-webapp | |
uses: azure/webapps-deploy@v2 | |
with: | |
images: '' | |
app-name: 'mapleriverbasketball' | |
slot-name: 'Production' | |
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_725A7776FF3A481CB7B0C252AFBE1432 }} | |
package: . |