{"id":28148693,"url":"https://github.com/alexander-kastil/angular-devops","last_synced_at":"2026-04-26T20:32:02.228Z","repository":{"id":64267202,"uuid":"574613637","full_name":"alexander-kastil/angular-devops","owner":"alexander-kastil","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-10T13:02:39.000Z","size":803,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-31T22:21:59.668Z","etag":null,"topics":["angular","az-400","devops"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexander-kastil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-12-05T17:38:03.000Z","updated_at":"2024-09-10T13:05:09.000Z","dependencies_parsed_at":"2024-08-15T08:34:31.272Z","dependency_job_id":null,"html_url":"https://github.com/alexander-kastil/angular-devops","commit_stats":null,"previous_names":["alexander-kastil/angular-devops"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alexander-kastil/angular-devops","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-kastil%2Fangular-devops","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-kastil%2Fangular-devops/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-kastil%2Fangular-devops/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-kastil%2Fangular-devops/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexander-kastil","download_url":"https://codeload.github.com/alexander-kastil/angular-devops/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-kastil%2Fangular-devops/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32312246,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T19:15:34.056Z","status":"ssl_error","status_checked_at":"2026-04-26T19:15:15.467Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","az-400","devops"],"created_at":"2025-05-15T01:14:06.471Z","updated_at":"2026-04-26T20:32:02.209Z","avatar_url":"https://github.com/alexander-kastil.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"- This is a simple sample to demonstrate Azure Static WebApps. It uses URL Rewriting in Angular. Click on \"About\", bookmark it and close and reopen the browser. Use your bookmark\n\n- The app is using a mock `apiUrl` that is defined in environments.ts and whos value will be replaced by the Azure DevOps\n\n- Examine `staticwebapp.config.json`. It contains the configuration for the Azure Static Web App. Here it sets `URL-rewriting` rules.\n\n  ```json\n  {\n    \"navigationFallback\": {\n      \"rewrite\": \"/index.html\",\n      \"exclude\": [\"/assets/*\"]\n    },\n    \"responseOverrides\": {\n      \"404\": {\n        \"rewrite\": \"/index.html\",\n        \"statusCode\": 200\n      }\n    }\n  }\n  ```\n- Login to Azrue\n\n  ```bash\n  az login\n  ```\n\n- Create the Static Web App by execution `create-static-web-app.azcli`. You will use the deployment token later in your DevOps pipeline:\n\n  ```bash\n  grp=ng-adv\n  loc=westeurope\n  app=angular-app-$RANDOM\n\n  az group create -n $grp -l $loc\n  az staticwebapp create -n $app -g $grp\n  token=$(az staticwebapp secrets list --name $app --query \"properties.apiKey\")\n  echo \"Deployment Token: $token\"\n  ```\n\n- Import `build-deploy-swa-ado.yml` into your Azure Devops tenant. It builds and deploys the app to Azure Static Web Apps. It uses the deployment token from the previous step.\n\n  ```yaml\n  name: Angular Static Website\n\n  trigger:\n    branches:\n      include:\n        - master\n\n    paths:\n      include:\n        - app/ui/*\n\n  pr: none\n\n  pool:\n    vmImage: \"ubuntu-latest\"\n\n  variables:\n    nodeVer: '18.10.0'\n    buildfolder: az-static-webapp\n    apploc: '\u003cpath-to-angular-app\u003e'\n    apiUrl: 'https://mockapi.azurewebsites.net'\n    deploymentToken: '\u003center-token-here\u003e'\n\n  stages:\n  - stage: Build\n    displayName: Build Angular\n\n    jobs:\n      - job: Build\n        steps:\n        - task: NodeTool@0\n          inputs:\n            versionSpec: $(nodeVer)\n          displayName: Install Node $(nodeVer)\n\n        - task: replacetokens@5\n          displayName: Update Config\n          inputs:\n            rootDirectory: '$(System.DefaultWorkingDirectory)/$(apploc)'\n            targetFiles: '**/*.prod.ts'\n            encoding: 'auto'\n            tokenPattern: 'doublebraces'\n            writeBOM: true\n            actionOnMissing: 'warn'\n            keepToken: false\n            actionOnNoFiles: 'continue'\n            enableTransforms: false\n            enableRecursion: false\n            useLegacyPattern: false\n            enableTelemetry: true\n\n        - task: Cache@2\n          inputs:\n              key: '$(System.DefaultWorkingDirectory)/$(apploc)package-lock.json'\n              path: '$(System.DefaultWorkingDirectory)/$(apploc)node_modules'\n              cacheHitVar: 'npmCache'\n\n        - script: npm install\n          displayName: 'npm i'\n          workingDirectory: $(apploc)\n          condition: eq(variables['npmCache'],False)\n\n        - script: npm run build-prod\n          displayName: 'Build App'\n          workingDirectory: $(apploc)\n\n        - task: PublishBuildArtifacts@1\n          inputs:\n            PathtoPublish: $(apploc)dist/$(buildfolder)\n            ArtifactName: 'ngapp'\n            publishLocation: 'Container'\n          displayName: 'Publish Artifacts'\n\n  - stage: Deploy\n    displayName: Deploy to static WA\n    jobs:\n      - job: Deploy\n        steps:\n          - checkout: self\n            submodules: true\n          - task: DownloadPipelineArtifact@2\n            inputs:\n              buildType: 'current'\n          - task: AzureStaticWebApp@0\n            inputs:\n              workingDirectory: '$(Pipeline.Workspace)'\n              app_location: 'ngapp'\n              config_file_location: 'ngapp/assets/'\n              skip_app_build: true\n              skip_api_build: true\n              azure_static_web_apps_api_token: '$(token)'\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexander-kastil%2Fangular-devops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexander-kastil%2Fangular-devops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexander-kastil%2Fangular-devops/lists"}