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 0a71339 commit 34d61f9
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/main_safehaven2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,25 @@ jobs:
- name: Prepare artifact directory
run: |
if (Test-Path -Path artifact\node-app.zip) {
Remove-Item -Path artifact\node-app.zip -Force
$artifactDir = "artifact"
$zipPath = "$artifactDir\node-app.zip"
if (Test-Path -Path $zipPath) {
Remove-Item -Path $zipPath -Force
}
if (-Not (Test-Path -Path artifact)) {
New-Item -Path artifact -ItemType Directory
if (Test-Path -Path $artifactDir) {
Remove-Item -Recurse -Force $artifactDir
}
New-Item -Path $artifactDir -ItemType Directory
shell: powershell

- name: Copy files to artifact directory
run: |
Get-ChildItem -Path . -Recurse | Copy-Item -Destination artifact -Force -PassThru
shell: powershell

- name: Create artifact archive
run: |
Copy-Item -Path "artifact\node-app.zip" -Force -PassThru |
Get-ChildItem |
Compress-Archive -Path .\* -DestinationPath "artifact\node-app.zip"
Compress-Archive -Path artifact\* -DestinationPath artifact\node-app.zip
shell: powershell

- name: Upload artifact for deployment job
Expand Down

0 comments on commit 34d61f9

Please sign in to comment.