Merge pull request #278 from ucdavis/ASX/CECDSS-11 #5
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
name: Azure Static Web Apps CI/CD | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build_and_deploy_job: | |
runs-on: ubuntu-latest | |
name: Build and Deploy Job | |
env: | |
CI: false # override CI falg so we don't fail on warnings | |
REACT_APP_BACKEND_BASE_API: ${{ secrets.REACT_APP_BACKEND_BASE_API }} | |
REACT_APP_LOCAL_DEVELOPMENT_MODE: ${{ secrets.REACT_APP_LOCAL_DEVELOPMENT_MODE }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
lfs: false | |
- name: Setup Node.js 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Debug Environment Variables | |
run: | | |
echo "Checking environment variables (values will be masked):" | |
echo "REACT_APP_BACKEND_BASE_API exists: ${{ env.REACT_APP_BACKEND_BASE_API != '' }}" | |
echo "REACT_APP_LOCAL_DEVELOPMENT_MODE exists: ${{ env.REACT_APP_LOCAL_DEVELOPMENT_MODE != '' }}" | |
- name: Build And Deploy | |
id: builddeploy | |
uses: Azure/static-web-apps-deploy@v1 | |
with: | |
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_KIND_OCEAN_071A97E1E }} | |
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for GitHub integrations (i.e. PR comments) | |
action: "upload" | |
# Repository/Build Configurations - adjust these to match your app requirements | |
app_location: "/" # App source code path | |
api_location: "" # API source code path - optional | |
output_location: "build" # Built app content directory - optional | |
env: | |
REACT_APP_BACKEND_BASE_API: ${{ secrets.REACT_APP_BACKEND_BASE_API }} | |
REACT_APP_LOCAL_DEVELOPMENT_MODE: ${{ secrets.REACT_APP_LOCAL_DEVELOPMENT_MODE }} |