Skip to content

Commit

Permalink
redeploy spa so wait time kicks in
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-scales committed Feb 26, 2024
1 parent 6a5d9f2 commit 99d5881
Showing 1 changed file with 1 addition and 78 deletions.
79 changes: 1 addition & 78 deletions .github/workflows/release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,70 +4,8 @@ name: Release

on:
push:
branches:
- prod

jobs:
build-api:
name: Build API Job
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.0.x'
include-prerelease: true

- name: Build with .NET
run: |
cd FU.API
dotnet build --configuration Release
shell: pwsh

- name: Publish
run: |
cd FU.API
dotnet publish -c Release
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: .net-app
path: D:\a\PalmettoProgrammers\PalmettoProgrammers\FU.API\FU.API\bin

deploy-api:
name: Deploy API Job
runs-on: windows-latest
needs: build-api
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
permissions:
id-token: write #This is required for requesting the JWT

steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: .net-app

- name: Login to Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_87D22017AF9A4422BFA98ED1ADF7422D }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_1C7528FFBA32419CB7F9CE5531B3980E }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_1AD9A60BDBC9485E80D6B3728DDF6729 }}

- name: Deploy API
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'fuapi'
slot-name: 'Production'
package: .

build-and-deploy-spa:
name: Build & Deploy SPA Job
runs-on: ubuntu-latest
Expand All @@ -86,19 +24,4 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: "upload"
app_location: "/FU.SPA" # App source code path
output_location: "dist"

comment:
name: Comment on Merge Request
runs-on: ubuntu-latest
needs: [deploy-api, build-and-deploy-spa]

steps:
- uses: actions/checkout@v4

- name: Comment on Merge Request
run: |
branch_name=$(echo "${{ github.event.head_ref }}" | sed 's/refs\/heads\///')
gh pr comment $branch_name -b "Deployed to https://jolly-glacier-0ae92c40f.4.azurestaticapps.net/"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
output_location: "dist"

0 comments on commit 99d5881

Please sign in to comment.