Skip to content

Commit

Permalink
#9 cicd for production
Browse files Browse the repository at this point in the history
  • Loading branch information
clezag committed Sep 23, 2024
1 parent 16ac7a7 commit a6171b9
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,31 @@ jobs:
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'
concurrency:
group: deploy-prod
cancel-in-progress: true
env:
PROJECT_NAME: c3nav-prod
steps:
- name: Checkout source code
uses: actions/checkout@v2

- name: Create .env file
uses: noi-techpark/github-actions/env-file@v2
env:
X_C3NAV_TAG: 897cf68ccc1731372ee3fba6044b6292f7bdc3d3
X_C3NAV_DOMAIN: maps.sfscon.it
X_SERVER_PORT: 1002

- name: Deploy application
uses: noi-techpark/github-actions/docker-deploy@v2
with:
hosts: 'maps.sfscon.it'
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 a6171b9

Please sign in to comment.