Use on deploy script too
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Ethan Lane 2023-12-29 20:27:38 +00:00
parent bc494970a0
commit 70457ac850

View file

@ -15,15 +15,19 @@ steps:
- npm test - npm test
- name: deploy to prod - name: deploy to prod
image: drillster/drone-rsync image: drillster/drone-rsync
secrets: ssh_key
settings: settings:
hosts: hosts:
- "minisforum.local" - 192.168.68.120
user: vylpes user: vylpes
key: key:
from_secret: ssh_key from_secret: ssh_key
source: . source: .
target: ~/apps/card-drop/card-drop_prod target: ~/apps/card-drop/card-drop_prod
recursive: true recursive: true
prescript:
- eval `ssh-agent -s`
- echo "$SSH_KEY" | tr -d '\r' | ssh-add -
script: script:
- cd ~/apps/card-drop/card-drop_prod - cd ~/apps/card-drop/card-drop_prod
- docker compose --file docker-compose.prod.yml up -d - docker compose --file docker-compose.prod.yml up -d
@ -62,6 +66,7 @@ steps:
target: ~/apps/card-drop/card-drop_stage target: ~/apps/card-drop/card-drop_stage
recursive: true recursive: true
prescript: prescript:
- eval `ssh-agent -s`
- echo "$SSH_KEY" | tr -d '\r' | ssh-add - - echo "$SSH_KEY" | tr -d '\r' | ssh-add -
script: script:
- cd ~/apps/card-drop/card-drop_stage - cd ~/apps/card-drop/card-drop_stage