Updated prod deploy to use new deploy script
This commit is contained in:
14
.github/workflows/deploy_production.yaml
vendored
14
.github/workflows/deploy_production.yaml
vendored
@@ -33,11 +33,15 @@ jobs:
|
|||||||
- name: Build the binary
|
- name: Build the binary
|
||||||
run: make build SUFFIX=-production-$GITHUB_SHA
|
run: make build SUFFIX=-production-$GITHUB_SHA
|
||||||
|
|
||||||
|
- name: Build the migration binary
|
||||||
|
run: make migrate SUFFIX=-production-$GITHUB_SHA
|
||||||
|
|
||||||
- name: Deploy to Server
|
- name: Deploy to Server
|
||||||
env:
|
env:
|
||||||
USER: deploy
|
USER: deploy
|
||||||
HOST: projectreshoot.com
|
HOST: projectreshoot.com
|
||||||
DIR: /home/deploy/releases/production
|
DIR: /home/deploy/releases/production
|
||||||
|
MIG_DIR: /home/deploy/migration-bin
|
||||||
DEPLOY_SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_SSH_PRIVATE_KEY }}
|
DEPLOY_SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_SSH_PRIVATE_KEY }}
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
@@ -49,7 +53,13 @@ jobs:
|
|||||||
echo " UserKnownHostsFile /dev/null" >> ~/.ssh/config
|
echo " UserKnownHostsFile /dev/null" >> ~/.ssh/config
|
||||||
|
|
||||||
ssh -i ~/.ssh/id_ed25519 $USER@$HOST mkdir -p $DIR
|
ssh -i ~/.ssh/id_ed25519 $USER@$HOST mkdir -p $DIR
|
||||||
|
|
||||||
scp -i ~/.ssh/id_ed25519 projectreshoot-production-${GITHUB_SHA} $USER@$HOST:$DIR
|
scp -i ~/.ssh/id_ed25519 projectreshoot-production-${GITHUB_SHA} $USER@$HOST:$DIR
|
||||||
|
|
||||||
ssh -i ~/.ssh/id_ed25519 $USER@$HOST 'bash -s' < ./deploy/deploy_production.sh $GITHUB_SHA
|
ssh -i ~/.ssh/id_ed25519 $USER@$HOST mkdir -p $MIG_DIR
|
||||||
|
scp -i ~/.ssh/id_ed25519 prmigrate-production-${GITHUB_SHA} $USER@$HOST:$MIG_DIR
|
||||||
|
|
||||||
|
scp -i ~/.ssh/id_ed25519 ./deploy/db/backup.sh $USER@$HOST:$MIG_DIR
|
||||||
|
scp -i ~/.ssh/id_ed25519 ./deploy/db/migrate.sh $USER@$HOST:$MIG_DIR
|
||||||
|
scp -i ~/.ssh/id_ed25519 ./deploy/db/migrationcleanup.sh $USER@$HOST:$MIG_DIR
|
||||||
|
|
||||||
|
ssh -i ~/.ssh/id_ed25519 $USER@$HOST 'bash -s' < ./deploy/deploy.sh $GITHUB_SHA production
|
||||||
|
|||||||
Reference in New Issue
Block a user