Last active
May 21, 2023 15:19
-
-
Save craigiswayne/e66421af4275ee947cd18ed726219d97 to your computer and use it in GitHub Desktop.
Azure Pipeline to Deploy Angular as a Static Web App
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trigger: | |
batch: true | |
branches: | |
include: | |
- '*' | |
pr: | |
branches: | |
include: | |
- '*' | |
variables: | |
# defined in the Pipeline Library variable group | |
# see: https://learn.microsoft.com/en-us/azure/devops/pipelines/library/variable-groups?view=azure-devops&tabs=yaml | |
- group: DEFAULT_VARIABLE_GROUP | |
pool: | |
vmImage: ubuntu-latest | |
steps: | |
- task: NodeTool@0 | |
displayName: 'Install Node.js' | |
inputs: | |
versionSpec: '14.21.3' | |
- task: Npm@1 | |
inputs: | |
command: 'ci' | |
- script: npm run build | |
- task: AzureStaticWebApp@0 | |
inputs: | |
app_location: 'dist/playground-angular' | |
# location of staticwebapp.config.json | |
config_file_location: '/' | |
skip_app_build: true | |
skip_api_build: true | |
is_static_export: true | |
azure_static_web_apps_api_token: '$(AZURE_STATIC_WEB_APPS_API_TOKEN)' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"navigationFallback": { | |
"rewrite": "/index.html", | |
"exclude": ["/images/*.{png,jpg,gif}", "/css/*", "/sitemap.xml", "/robots.txt"] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment