{"id":15385028,"url":"https://github.com/manekinekko/github-action-angular-hexa","last_synced_at":"2025-04-15T19:43:44.089Z","repository":{"id":38605300,"uuid":"240251574","full_name":"manekinekko/github-action-angular-hexa","owner":"manekinekko","description":"Deploy your Angular app to Azure with Hexa.run","archived":false,"fork":false,"pushed_at":"2023-01-07T14:50:58.000Z","size":2219,"stargazers_count":5,"open_issues_count":28,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T00:25:36.794Z","etag":null,"topics":["angular","azure","ci","cloud","deploy","hosting","javascript"],"latest_commit_sha":null,"homepage":"https://angularhexa81052.z6.web.core.windows.net/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manekinekko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-13T12:08:56.000Z","updated_at":"2022-01-12T00:16:18.000Z","dependencies_parsed_at":"2023-02-07T11:16:43.511Z","dependency_job_id":null,"html_url":"https://github.com/manekinekko/github-action-angular-hexa","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manekinekko%2Fgithub-action-angular-hexa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manekinekko%2Fgithub-action-angular-hexa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manekinekko%2Fgithub-action-angular-hexa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manekinekko%2Fgithub-action-angular-hexa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manekinekko","download_url":"https://codeload.github.com/manekinekko/github-action-angular-hexa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249141561,"owners_count":21219514,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","azure","ci","cloud","deploy","hosting","javascript"],"created_at":"2024-10-01T14:43:52.429Z","updated_at":"2025-04-15T19:43:44.073Z","avatar_url":"https://github.com/manekinekko.png","language":"HTML","readme":"# ![Deploy to Azure with Hexa.run](https://github.com/manekinekko/github-action-angular-hexa/workflows/Deploy%20to%20Azure%20with%20Hexa.run/badge.svg)\n\n## Deploy Angular to Azure with [Hexa.run](https://hexa.run)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/manekinekko/github-action-angular-hexa/raw/master/src/assets/angular-hexa-deploy-to-azure.png\"/\u003e\n\u003c/p\u003e\n\n\n### 1/ Install the Hexa.run CLI\n\nInside your Angular project make sure to install the Hexa.run CLI as a prod dependency `npm i -S @manekinekko/hexa` as you can see from the [package.json](https://github.com/manekinekko/github-action-angular-hexa/blob/master/package.json#L29) of this project. \n\n### 2/ Add your NPM aliases (optional)\nThe `npm run heax:...` commands mentioned below are just aliases to the Hexa cli ( [see the package.json example file](https://github.com/manekinekko/github-action-angular-hexa/blob/master/package.json#L11-L17) ). You will have to add them to your own `package.json` or use your own aliases.\n\n### 3/ On your local machine\n\n- Install the Hexa.run CLI: `npm i -S @manekinekko/hexa`\n- Log into your Azure account: `npm run hexa:login`\n- Run the Hexa CLI and follow the instructions: `npm run hexa:init`.\n  - NOTE: the hosting public folder should point to `./dist/angular-app-name/`\n- Hexa will create a `hexa.json` (you need to version it to git).\n- Commit your changes.\n- Run `npm run hexa:ci`, and write down the following credentials (you will need them later):\n```\n{\n  appId: 'xx4362xx-aaxx-40xx-8bxx-xx6ea0c351xx',\n  displayName: 'appname',\n  name: 'http://appname',\n  password: 'xxce72xx-1axx-44xx-81xx-35xxb15xxa1e',\n  tenant: 'xxf988xx-86xx-41xx-91xx-2d7cd011dbxx'\n}\n```\n\n### 4/ On the CI\n- Configure your CI with the following environment variables (secrets):\n`AZURE_SERVICE_PRINCIPAL_ID`: the appId from the service principal config.\n`AZURE_SERVICE_PRINCIPAL_PASSWORD`: the password from the service principal config.\n`AZURE_SERVICE_PRINCIPAL_TENANT`: The tenant from the service principal config.\n- On your workflow, run the following sequence (in this order):\n1. `npm run hexa:login` (this will login to Azure using your secrets)\n1. `npm run build -- --prod` this will build your Angular app in production mode.\n1. `npm run hexa:deploy` this will initiate the deploy process to your Azure storage and prints out the URL to your application, which looks like `➜ Hosting: https://xxxx.yy.web.core.windows.net`\n1. Enjoy your newly deployed Angular application 🎉\n\n### Notes\n\nWhen it comes to hosting your static application on Azure, Hexa.run will automatically:\n1. create an Azure resource group (or lets you choose an existing one) \n2. create the Azure storage account \n3. configure the storage account and make it `static-website` ready\n4. upload the angular bundle.\n5. prints the generated URL from the Azure service.\n\nHexa can also deploy your Azure Functions, Table Storage or Cosmos DB, etc. ([read me](https://hexa.run)).\n\nDon't have an Azure account? [Create one for free](azure.microsoft.com/free/?WT.mc_id=hexa-github-wachegha) and get started with 12 months of free services.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanekinekko%2Fgithub-action-angular-hexa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanekinekko%2Fgithub-action-angular-hexa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanekinekko%2Fgithub-action-angular-hexa/lists"}