{"id":26776276,"url":"https://github.com/ahsanayaz/angular-deploy-gh-pages-actions","last_synced_at":"2025-07-29T07:35:12.239Z","repository":{"id":38567106,"uuid":"247667483","full_name":"AhsanAyaz/angular-deploy-gh-pages-actions","owner":"AhsanAyaz","description":"Github actions to automagically deploy your angular app to GitHub pages.","archived":false,"fork":false,"pushed_at":"2024-04-20T17:07:30.000Z","size":1173,"stargazers_count":61,"open_issues_count":39,"forks_count":23,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-23T23:49:26.431Z","etag":null,"topics":["angular","continuous","continuous-deployment","github-action","github-actions","github-pages","hackathon","javascript","typescript"],"latest_commit_sha":null,"homepage":"https://ahsanayaz.github.io/angular-deploy-gh-pages-actions","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/AhsanAyaz.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-16T09:59:25.000Z","updated_at":"2025-06-19T02:10:09.000Z","dependencies_parsed_at":"2024-06-18T15:19:07.591Z","dependency_job_id":"db4af512-fdbf-4f70-bbe2-2e18b00e9571","html_url":"https://github.com/AhsanAyaz/angular-deploy-gh-pages-actions","commit_stats":{"total_commits":45,"total_committers":9,"mean_commits":5.0,"dds":0.5333333333333333,"last_synced_commit":"2272ef32f364bc80d8680ee03d8e58f126156c31"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":"actions/typescript-action","purl":"pkg:github/AhsanAyaz/angular-deploy-gh-pages-actions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhsanAyaz%2Fangular-deploy-gh-pages-actions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhsanAyaz%2Fangular-deploy-gh-pages-actions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhsanAyaz%2Fangular-deploy-gh-pages-actions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhsanAyaz%2Fangular-deploy-gh-pages-actions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AhsanAyaz","download_url":"https://codeload.github.com/AhsanAyaz/angular-deploy-gh-pages-actions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhsanAyaz%2Fangular-deploy-gh-pages-actions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267646452,"owners_count":24121022,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","continuous","continuous-deployment","github-action","github-actions","github-pages","hackathon","javascript","typescript"],"created_at":"2025-03-29T03:34:34.205Z","updated_at":"2025-07-29T07:35:12.213Z","avatar_url":"https://github.com/AhsanAyaz.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :rocket: Angular Deploy gh-pages Actions\n\n![build-test](https://github.com/AhsanAyaz/angular-deploy-gh-pages-actions/workflows/build-test/badge.svg) [![View Action](https://img.shields.io/badge/action-marketplace-blue.svg?logo=github\u0026color=orange)](https://github.com/marketplace/actions/angular-deploy-gh-pages-actions/) [![Version](https://img.shields.io/github/v/release/AhsanAyaz/angular-deploy-gh-pages-actions.svg?logo=github)](https://github.com/AhsanAyaz/angular-deploy-gh-pages-actions/releases)\n\nThis [GitHub action](https://github.com/features/actions) will handle the deploy process of your angular application to [GitHub Pages](https://pages.github.com/). You can configure what folder will be deployed once the build is created. Also, you can specify which branch to deploy to.\n\n![image](assets/github-actions.png)\n\n## Getting Started :muscle:\n\nYou can include the action in your workflow to trigger on any event that [GitHub actions supports](https://help.github.com/en/articles/events-that-trigger-workflows). If the remote branch that you wish to deploy to doesn't already exist the action will create it for you. Your workflow will also need to include the `actions/checkout` step before this workflow runs in order for the deployment to work.\n\nYou can view an example of this below.\n\n```yml\nname: Build and Deploy\non:\n  push:\n    branches:\n      - master\njobs:\n  build:\n\n    runs-on: ubuntu-latest\n\n    steps:\n    - uses: actions/checkout@v3\n    - name: All things angular\n      uses: AhsanAyaz/angular-deploy-gh-pages-actions@[version] ## replace by latest version without it you will see Expected format {org}/{repo}[/path]@ref. Actual 'AhsanAyaz/angular-deploy-gh-pages-actions',Input string was not in a correct format.\n      with:\n        github_access_token: ${{ secrets.GITHUB_TOKEN }} # see the Configuration section for how you can create secrets\n        build_configuration: staging # The build environment for the app. please look configurations in your angular.json\n        base_href: /my-project/   # make sure this corresponds to https://\u003cyour_username\u003e.github.io/\u003cbase_href\u003e/\n        deploy_branch: gh-pages # The branch the action should deploy to.\n        angular_dist_build_folder: dist/my-project # The folder where your project is supposed to be after running ng build by the action.\n\npermissions:\n  contents: write # Allow write permission to GITHUB_TOKEN to commit to deploy branch.\n```\n\nIf you'd like to make it so the workflow only triggers on push events to specific branches then you can modify the `on` section.\n\n\n## Configuration ⚙️\n\nYou have to configure the `with` portion of your workflow file so that the action works fine. See the usage of `with` in the example above. Fir the Github secret (ACCESS_TOKEN) or anything added later, `secrets` must be referenced using the bracket syntax and stored in the GitHub repositories `Settings/Secrets` menu. You can learn more about setting environment variables with GitHub actions [here](https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idstepsenv).\n\n| Key            | Value Information                                                                                                                                                                                                                                                                                                                                                                                                                                              | Type             | Required | Default |\n| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | -------- | -------- |\n| `angular_project_dir`          | The directory of the angular project, in which all the commands will run. This is super handy when you have several projects within a workspace. Or have a demo angular project within a library. Defaults to current workspace directory                                                                                                                                                            | `with`           | **Yes**  |  \"./\"  |\n| `build_configuration`          | You can provide the configuration using which the action should create the build. If nothing is provided, it will run `ng build --prod` by default. See your angular.json file for configurations.                                                                                                                                                            | `with`           | **Yes**  |  \"production\"  |\n| `base_href`          | Since gh-pages will deploy the app for https://yourgithubusername.github.io/repositoryname/, you need to provide this `base-href` in order to have your project working correctly, since the base-href won't be `'/'` in this case. Note to use with `@angular/cli@^10.0.0` (Angular version 10), you need the specify the base-href in the angular.json file and then use an empty string as parameter `base_href: '' # empty string to support optional base-href` to make the parameter optional.                                                                                                                                                            | `with`           | **No**  | \"/\" |\n| `deploy_branch`          | The branch to which we'll deploy the build folder.                                                                                                                                                            | `with`           | **No**  | \"gh-pages\" |\n| `angular_dist_build_folder`          | The folder in which `ng build` provides its output for your project. The folder where your index.html resides in. Also, this is the folder which will be deployed to the `deploy_branch`.                                                                                                                                                             | `with`           | **No**  | \"dist\" |\n| `run_lint`          | Runs the `ng lint` command behind the scenes to make sure the files are linted properly.                                                                                                                                                             | `with`           | **No**  | \"false\" |\n| `github_access_token` | Depending on the repository permissions you may need to provide the action with a GitHub personal access token instead of the provided GitHub token in order to deploy. You can [learn more about how to generate one here](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line). **This should be stored as a secret**.                                                                                                 | `secrets / with` | **Yes**  |\n\n## Contributing :person:\n\nInstall the dependencies\n```bash\n$ npm install\n```\n\nBuild the typescript and package it for distribution\n```bash\n$ npm run build \u0026\u0026 npm run pack\n```\n\nRun the tests :heavy_check_mark:\n```bash\n$ npm test\n  PASS  __tests__/main.test.ts\n    ✓ test does not run lint if run_lint is falsy (3ms)\n    ✓ test runs lint if run_lint is not falsy (1ms)\n    ✓ test throws error for deployment if accessToken is not provided (17ms)\n    ✓ test runs fine for deployment if all inputs are correct (1ms)\n    ✓ test runs createBuild with provided values  (1ms)\n    ✓ test runs createBuild with default values if they are not explicitly provided\n\n...\n```\n\n\nSee the [versioning documentation](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md)\n\n## LICENSE 📋\n[Licensed under the MIT License (the \"License\")](./LICENSE);\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahsanayaz%2Fangular-deploy-gh-pages-actions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahsanayaz%2Fangular-deploy-gh-pages-actions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahsanayaz%2Fangular-deploy-gh-pages-actions/lists"}