Adds azure secrets for SWA
This commit is contained in:
19
.github/workflows/frontend-ci.yml
vendored
19
.github/workflows/frontend-ci.yml
vendored
@@ -2,25 +2,36 @@ name: Frontend CI/CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
AZURE_SWA_NAME: hutopy-portal
|
||||
|
||||
jobs:
|
||||
build_and_deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
# Checkout the repository
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install dependencies
|
||||
|
||||
# Npm install
|
||||
- name: npm install
|
||||
run: |
|
||||
cd frontend
|
||||
npm install
|
||||
- name: Build
|
||||
|
||||
# Npm run build
|
||||
- name: npm run build
|
||||
run: |
|
||||
cd frontend
|
||||
npm run build
|
||||
|
||||
- name: Deploy to Azure Static Web Apps
|
||||
uses: azure/static-web-apps-deploy@v1
|
||||
with:
|
||||
app_location: "frontend"
|
||||
app_location: '${{ env.AZURE_SWA_NAME }}'
|
||||
api_location: ""
|
||||
output_location: "dist"
|
||||
azure_static_web_apps_api_token: ${{ secrets.AZURE_SWA_TOKEN }}
|
||||
Reference in New Issue
Block a user