Skip to content

Commit

Permalink
fix(cd-cd): deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
rutajdash authored Jun 17, 2022
1 parent 516244c commit fde4f0a
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ jobs:
name: Pull and Run Docker Container
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
# - name: Checkout Repository
# uses: actions/checkout@v2

- name: Add Env File
run: ${{ secrets.env_vars }} > client/env/.env.${{ inputs.node_env }}
# - name: Add Env File
# run: ${{ secrets.env_vars }} > client/env/.env.${{ inputs.node_env }}

- name: Copy Required Files
uses: appleboy/[email protected]
with:
host: ${{ inputs.ssh_host }}
username: ${{ inputs.ssh_username }}
key: ${{ secrets.ssh_private_key }}
source: "docker-compose.yml,client/env/.env.${{ inputs.node_env }}"
target: "~/apps/project-tahiti"
# - name: Copy Required Files
# uses: appleboy/[email protected]
# with:
# host: ${{ inputs.ssh_host }}
# username: ${{ inputs.ssh_username }}
# key: ${{ secrets.ssh_private_key }}
# source: "docker-compose.yml,client/env/.env.${{ inputs.node_env }}"
# target: "~/apps/project-tahiti"

- name: Run SSH Commands
uses: appleboy/[email protected]
Expand All @@ -52,5 +52,7 @@ jobs:
key: ${{ secrets.ssh_private_key }}
script: |
cd ~/apps/project-tahiti
docker pull ${{ inputs.registry }}/${{ inputs.image_name }}:${{ inputs.node_env }}
docker-compose up
docker pull ghcr.io/monday-morning/project-tahiti:production
docker-compose down
docker-compose up -d
docker image prune -a -f

0 comments on commit fde4f0a

Please sign in to comment.