Skip to content

Commit

Permalink
chore: add symlink replacement also to real deployment (#2257)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasdiez authored Oct 2, 2023
1 parent e8bdb20 commit 1351604
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,21 @@ jobs:

- name: Deploy Function App
run: |
# Nuxt/nitro creates symlinks to replicate parts of the node_modules folder
# if multiple versions of the same package are used.
# However, these symlinks are not preserved by Compress-Archive, and even they were, Azure has problems with symlinks:
# https://github.com/Azure/webapps-deploy/issues/54
# Therefore, replace all symlinks by the actual files
$links = Get-ChildItem -Path .output\server -Attributes ReparsePoint -Recurse
foreach ($link in $links)
{
$source = $link.Target;
$destination = $link.FullName;
Remove-Item $destination -Force
Copy-Item -Path $source -Destination $destination -Force -Recurse
}
Compress-Archive -Path .output\server\* -DestinationPath .output\server.zip
az functionapp deployment source config-zip -g JabRefOnline -n jabref-function-${{ matrix.deployment_environment }} --src .output\server.zip
Expand Down

0 comments on commit 1351604

Please sign in to comment.