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