Create frontend.yml #1
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: Blob storage website CI | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: azure/login@v1 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
- name: Upload to blob storage | |
uses: azure/CLI@v1 | |
with: | |
inlineScript: | | |
cd Platform/client | |
export REACT_APP_BASE_URL="climateappapi.azurewebsites.net" | |
npm install | |
npm run build | |
cd build | |
az storage blob upload-batch --account-name climatehackathondatalake --auth-mode key -d '$web' -s . | |
# Azure logout | |
- name: logout | |
run: | | |
az logout | |
if: always() | |