adding github actions workflows

This commit is contained in:
2024-05-21 16:32:07 -05:00
parent 721b20b116
commit c705cc0932
2 changed files with 71 additions and 0 deletions

29
.github/workflows/feature.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: Feature
on:
push:
branches:
- feature/**
jobs:
build_and_deploy_job:
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v4
with:
submodules: true
- 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_location: "/"
app_build_command: 'npm run build-storybook'
api_location: ""
output_location: "storybook-static"
deployment_environment: "development"

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

@@ -0,0 +1,42 @@
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_location: '/'
app_build_command: 'npm run build-storybook'
api_location: ''
output_location: 'storybook-static'
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'