adding github actions workflows (#9)

* adding github actions workflows

* Updating github actions app and api build commands and locations
This commit was merged in pull request #9.
This commit is contained in:
2024-05-21 18:22:21 -05:00
committed by GitHub
parent 3b68021d93
commit 977db84d48
2 changed files with 73 additions and 0 deletions

43
.github/workflows/pull_request.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: Pull Request
on:
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main
jobs:
build_and_deploy_job:
if: github.event_name == 'pull_request' && github.event.action != 'closed'
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v4
with:
submodules: true
lfs: false
- 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 }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: 'upload'
app_build_command: ${{ vars.APP_BUILD_COMMAND }}
app_location: ${{ vars.APP_LOCATION }}
api_build_command: ${{ vars.API_BUILD_COMMAND }}
api_location: ${{ vars.API_LOCATION}}
output_location: ${{ vars.OUTPUT_LOCATION }}
deployment_environment: 'staging'
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
action: 'close'