Skip to content
name: MAIN - Azure Static Web Apps CI/CD
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main
jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: MAIN - Build and Deploy Job
steps:
- name: ALL - Checkout
uses: actions/checkout@v4
with:
submodules: true
lfs: false
- name: ALL
uses: ./yml/azure-ritsafn-all
- name: MAIN
uses: ./yml/azure-ritsafn-main
- name: MAIN - Build And Deploy
id: main-builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_AGREEABLE_SKY_0B5652E03 }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: "upload"
app_location: "rit/_build/html"
api_location: ""
output_location: ""
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: MAIN - Close Pull Request Job
steps:
- name: MAIN - Close Pull Request
id: main-closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_AGREEABLE_SKY_0B5652E03 }}
action: "close"