Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy frontend to swa #32

Merged

Conversation

LittleLittleCloud
Copy link
Collaborator

Purpose

  • ...

Does this introduce a breaking change?

[ ] Yes
[ ] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

IEvangelist
IEvangelist previously approved these changes Apr 20, 2023
Copy link
Member

@IEvangelist IEvangelist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, a few suggestions.

@LittleLittleCloud LittleLittleCloud merged commit f397cec into Azure-Samples:main Apr 20, 2023
@@ -7,6 +7,7 @@
<ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
<BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<UserSecretsId>c1ddb026-bba7-49ff-960b-5603e48ee863</UserSecretsId>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you want this committed right?

Comment on lines +12 to +21
prepackage:
shell: pwsh
run: cd ../;./map-env.ps1 && cd frontend && dotnet publish -p:BACKEND_URI=$env:BACKEND_URI -o build
continueOnError: false
interactive: true
postdeploy:
shell: pwsh
run: rm -Force -r ./build
continueOnError: false
interactive: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include linux as well

hooks:
prepackage:
shell: pwsh
run: cd ../;./map-env.ps1 && cd frontend && dotnet publish -p:BACKEND_URI=$env:BACKEND_URI -o build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could make this a global hook and not have to do a cd ../

hooks:
prepackage:
shell: pwsh
run: cd ../;./map-env.ps1 && cd frontend && dotnet publish -p:BACKEND_URI=$env:BACKEND_URI -o build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't need map-env in a hook. Those values are already available in the hook context.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does that mean I don't need to call map-env at all? Can you show me an example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants