Skip to content

Commit

Permalink
ci/cd: disable prod deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
dulvui committed May 28, 2024
1 parent 3305224 commit ed02e9b
Showing 1 changed file with 37 additions and 37 deletions.
74 changes: 37 additions & 37 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,40 +46,40 @@ jobs:
docker-password: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
project-name: ${{ env.PROJECT_NAME }}

deploy-prod:
runs-on: ubuntu-22.04
if: github.ref == 'refs/heads/prod'
# needs: test
concurrency: deploy-prod
env:
SERVER_PORT: 1006
DOCKER_TAG: ${{ github.sha }}
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Create .env file
uses: noi-techpark/github-actions/env-file@v2
with:
working-directory: ${{ env.WORKING_DIRECTORY }}
env:
X_SERVER_PORT: ${{ env.SERVER_PORT }}
X_DOCKER_IMAGE: ${{ env.DOCKER_IMAGE }}
X_DOCKER_TAG: ${{ env.DOCKER_TAG }}

- name: Build and push images
uses: noi-techpark/github-actions/docker-build-and-push@v2
with:
working-directory: infrastructure
docker-username: ${{ github.actor }}
docker-password: ${{ secrets.GITHUB_TOKEN }}

- name: Deploy application
uses: noi-techpark/github-actions/docker-deploy@v2
with:
working-directory: infrastructure/ansible
hosts: "test"
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
docker-username: "noi-techpark-bot"
docker-password: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
project-name: ${{ env.PROJECT_NAME }}
# deploy-prod:
# runs-on: ubuntu-22.04
# if: github.ref == 'refs/heads/prod'
# # needs: test
# concurrency: deploy-prod
# env:
# SERVER_PORT: 1006
# DOCKER_TAG: ${{ github.sha }}
# steps:
# - name: Checkout source code
# uses: actions/checkout@v4
#
# - name: Create .env file
# uses: noi-techpark/github-actions/env-file@v2
# with:
# working-directory: ${{ env.WORKING_DIRECTORY }}
# env:
# X_SERVER_PORT: ${{ env.SERVER_PORT }}
# X_DOCKER_IMAGE: ${{ env.DOCKER_IMAGE }}
# X_DOCKER_TAG: ${{ env.DOCKER_TAG }}
#
# - name: Build and push images
# uses: noi-techpark/github-actions/docker-build-and-push@v2
# with:
# working-directory: infrastructure
# docker-username: ${{ github.actor }}
# docker-password: ${{ secrets.GITHUB_TOKEN }}
#
# - name: Deploy application
# uses: noi-techpark/github-actions/docker-deploy@v2
# with:
# working-directory: infrastructure/ansible
# hosts: "test"
# ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
# docker-username: "noi-techpark-bot"
# docker-password: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
# project-name: ${{ env.PROJECT_NAME }}

0 comments on commit ed02e9b

Please sign in to comment.