Skip to content

Commit

Permalink
Update main_safehaven2.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaloney111 authored Jun 6, 2024
1 parent ea2178d commit 3b00c3c
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/main_safehaven2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,27 @@ jobs:
npm install
cd ../../
- name: Create artifact directory
- name: Prepare artifact directory
run: |
if (Test-Path -Path artifact) {
Remove-Item -Recurse -Force artifact
if (Test-Path -Path artifact\node-app.zip) {
Remove-Item -Path artifact\node-app.zip -Force
}
if (-Not (Test-Path -Path artifact)) {
New-Item -Path artifact -ItemType Directory
}
New-Item -Path artifact -ItemType Directory
shell: powershell

- name: Create artifact archive
run: |
Compress-Archive -Path .\* -DestinationPath artifact\nodeapp.zip
Start-Sleep -Seconds 20
Compress-Archive -Path .\* -DestinationPath artifact\node-app.zip
shell: powershell

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v3
with:
name: nodeapp
path: artifact/nodeapp.zip
name: node-app
path: artifact/node-app.zip

deploy:
runs-on: ubuntu-latest
Expand All @@ -56,11 +59,11 @@ jobs:
- name: Download artifact from build job
uses: actions/download-artifact@v3
with:
name: nodeapp
name: node-app
path: ./artifact

- name: Unzip artifact
run: unzip artifact/nodeapp.zip -d ./artifact
run: unzip artifact/node-app.zip -d ./artifact

- name: Login to Azure
uses: azure/login@v1
Expand Down

0 comments on commit 3b00c3c

Please sign in to comment.