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
|
||||
uses: appleboy/ssh-action@v1.0.3
|
||||
with:
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
username: ${{ secrets.SSH_USER }}
|
||||
host: ${{ secrets.SSH_HOST }} # srv.ephaitek.com
|
||||
port: ${{ secrets.SSH_PORT }} # 2224
|
||||
username: ${{ secrets.SSH_USER }} # deployer
|
||||
key: ${{ secrets.SSH_KEY }}
|
||||
script_stop: true
|
||||
envs: DEPLOY_PULL_TOKEN
|
||||
script: |
|
||||
set -euo pipefail
|
||||
cd /srv/ihm/app/IHMKOS
|
||||
git pull --rebase --ff-only
|
||||
/srv/ihm/scripts/docker-run-canary.sh
|
||||
|
||||
# (au cas où) éviter "dubious ownership" si ça réapparaît
|
||||
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