Actualiser .gitea/workflows/deploy-canary.yml
This commit is contained in:
1 parent
475b9d0097
commit
9278ce9e36
1 file changed
+24
-7
@@ -60,13 +60,30 @@ jobs:
|
|||||||
- name: Deploy to CANARY
|
- name: Deploy to CANARY
|
||||||
uses: appleboy/ssh-action@v1.0.3
|
uses: appleboy/ssh-action@v1.0.3
|
||||||
with:
|
with:
|
||||||
host: ${{ secrets.SSH_HOST }}
|
host: ${{ secrets.SSH_HOST }} # srv.ephaitek.com
|
||||||
port: ${{ secrets.SSH_PORT }}
|
port: ${{ secrets.SSH_PORT }} # 2224
|
||||||
username: ${{ secrets.SSH_USER }}
|
username: ${{ secrets.SSH_USER }} # deployer
|
||||||
key: ${{ secrets.SSH_KEY }}
|
key: ${{ secrets.SSH_KEY }}
|
||||||
script_stop: true
|
envs: DEPLOY_PULL_TOKEN
|
||||||
script: |
|
script: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
cd /srv/ihm/app/IHMKOS
|
|
||||||
git pull --rebase --ff-only
|
# (au cas où) éviter "dubious ownership" si ça réapparaît
|
||||||
/srv/ihm/scripts/docker-run-canary.sh
|
git config --global --add safe.directory /srv/ihm/app/IHMKOS || true
|
||||||
|
|
||||||
|
# Auth HTTPS non interactive via .netrc (éphémère)
|
||||||
|
umask 077
|
||||||
|
cat > ~/.netrc <<EOF
|
||||||
|
machine ephagit.ephaitek.com
|
||||||
|
login moham
|
||||||
|
password ${DEPLOY_PULL_TOKEN}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Pull du code
|
||||||
|
git -C /srv/ihm/app/IHMKOS pull --rebase --ff-only
|
||||||
|
|
||||||
|
# Nettoyage
|
||||||
|
rm -f ~/.netrc
|
||||||
|
|
||||||
|
# Redémarrer le canary
|
||||||
|
/srv/ihm/scripts/docker-run-canary.sh
|
||||||
Reference in new issue
Block a user