{"id":21089414,"url":"https://github.com/id1945/angular-gitlab-cicd-nginx","last_synced_at":"2025-03-14T06:13:34.131Z","repository":{"id":102416915,"uuid":"444347477","full_name":"id1945/angular-gitlab-cicd-nginx","owner":"id1945","description":"Angular Gitlab CICD, Shell, Bash, Command basic, Deploy Nginx, Linux","archived":false,"fork":false,"pushed_at":"2022-01-04T09:21:06.000Z","size":198,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-21T00:50:23.786Z","etag":null,"topics":["angular","bash","cicd","command","deployment","gitlab","linux","nginx","shell"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/id1945.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}},"created_at":"2022-01-04T08:49:19.000Z","updated_at":"2024-07-14T14:33:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"4207449c-1f3a-4cc1-8a27-adb6f9d7fa34","html_url":"https://github.com/id1945/angular-gitlab-cicd-nginx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/id1945%2Fangular-gitlab-cicd-nginx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/id1945%2Fangular-gitlab-cicd-nginx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/id1945%2Fangular-gitlab-cicd-nginx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/id1945%2Fangular-gitlab-cicd-nginx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/id1945","download_url":"https://codeload.github.com/id1945/angular-gitlab-cicd-nginx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243532564,"owners_count":20306157,"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","bash","cicd","command","deployment","gitlab","linux","nginx","shell"],"created_at":"2024-11-19T21:28:49.346Z","updated_at":"2025-03-14T06:13:34.096Z","avatar_url":"https://github.com/id1945.png","language":"HTML","readme":"# ஜ۩ Install a runner - Linux ۩ஜ\n\n![Logo](https://raw.githubusercontent.com/id1945/angular-gitlab-cicd-nginx/master/runner-token.png)\n![Logo](https://raw.githubusercontent.com/id1945/angular-gitlab-cicd-nginx/master/pieline.png)\n\n### .gitlab-ci.yml\n\n```yml\nstages:          # List of stages for jobs, and their order of execution\n  - build\n  - deploy\n\nbuild-job:       # This job runs in the build stage, which runs first.\n  stage: build\n  tags:\n    - angularci\n  script:\n    - echo \"Compiling the code...\"\n    - npm i\n    - npm run build\n    - echo \"Compile complete.\"\n  artifacts:\n    expire_in: 1 hour\n    paths:\n      - dist\n  only: \n    - master\n\ndeploy-job:      # This job runs in the deploy stage.\n  stage: deploy  # It only runs when *both* jobs in the test stage complete successfully.\n  tags:\n    - angularci\n  script:\n    - echo \"Deploying application...\"\n    - chmod +x deploy.sh\n    - bash deploy.sh\n    #- sudo rm -rf /usr/share/nginx/html/*\n    #- sudo cp -rv dist/angular-ci/* /usr/share/nginx/html\n    - echo \"Application successfully deployed.\"\n  only: \n    - master\n```\n\n### ⌛ [1] Download the binary for your system\n```bash\nsudo curl -L --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64\n```\n\n### ⌛ [2] Give it permissions to execute\n```bash\nsudo chmod +x /usr/local/bin/gitlab-runner\n```\n\n### ⌛ [3] Create a GitLab CI user\n```bash\nsudo useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash\n```\n\n### ⌛ [4] Install and run as service\n```bash\nsudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner\nsudo gitlab-runner start\n```\n\n### ⌛ [5] Command to register runner\n```bash\nsudo gitlab-runner register --url https://gitlab.com/ --registration-token $REGISTRATION_TOKEN\n```\n\n### ⌛ [6] Preparing the \"shell\" executor\n```bash\nsudo gitlab-runner run\n```\n\n## ✍ Setup sudo password\n```bash\n$ sudo usermod -a -G sudo gitlab-runner\n$ sudo visudo\ngitlab-runner ALL=(ALL) NOPASSWD: ALL\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fid1945%2Fangular-gitlab-cicd-nginx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fid1945%2Fangular-gitlab-cicd-nginx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fid1945%2Fangular-gitlab-cicd-nginx/lists"}