diff --git a/.gitea/workflows/deploy-staging.yml b/.gitea/workflows/deploy-staging.yml index 757787c..2f576f5 100644 --- a/.gitea/workflows/deploy-staging.yml +++ b/.gitea/workflows/deploy-staging.yml @@ -45,7 +45,7 @@ jobs: set -euo pipefail BRANCH="${STAGING_GIT_BRANCH:?STAGING_GIT_BRANCH is required}" bash tools/ci/gitea-actions-ssh-config.sh staging "$STAGING_HOST" "$STAGING_USER" "$STAGING_PORT" "$STAGING_SSH_KEY" "$STAGING_SSH_KNOWN_HOSTS" - ssh -F "${HOME}/.ssh/gitea_ci_staging.conf" staging "cd /opt/bitreport/ai-news-writer && git fetch origin && git pull --ff-only origin ${BRANCH} && npm ci --omit=dev && npm run lint --quiet" + ssh -F "${HOME}/.ssh/gitea_ci_staging.conf" staging "cd /opt/bitreport/ai-news-writer && git fetch origin && git pull --ff-only origin ${BRANCH} && npm ci --omit=dev" ssh -F "${HOME}/.ssh/gitea_ci_staging.conf" staging "cd /opt/bitreport/ai-news-writer && pm2 startOrReload ecosystem.config.cjs --update-env" - name: Health check — staging @@ -76,7 +76,7 @@ jobs: bash tools/ci/gitea-actions-ssh-config.sh staging "$STAGING_HOST" "$STAGING_USER" "$STAGING_PORT" "$STAGING_SSH_KEY" "$STAGING_SSH_KNOWN_HOSTS" echo "Attempting automatic rollback to previous commit..." ssh -F "${HOME}/.ssh/gitea_ci_staging.conf" staging "cd /opt/bitreport/ai-news-writer && git log --oneline -2" - ssh -F "${HOME}/.ssh/gitea_ci_staging.conf" staging "cd /opt/bitreport/ai-news-writer && git revert HEAD --no-edit && git push origin ${BRANCH}" + ssh -F "${HOME}/.ssh/gitea_ci_staging.conf" staging "cd /opt/bitreport/ai-news-writer && git revert HEAD -m 1 --no-edit && git push origin ${BRANCH}" ssh -F "${HOME}/.ssh/gitea_ci_staging.conf" staging "cd /opt/bitreport/ai-news-writer && git fetch origin && git pull --ff-only origin ${BRANCH} && npm ci --omit=dev && pm2 startOrReload ecosystem.config.cjs --update-env" echo "Staging deployment failed — rollback attempted" exit 1