Merge pull request 'fix(ci): drop lint from staging deploy; fix revert for merge commits (BIT-21923)' (#21) from fix/BIT-21923-deploy-staging-lint into main
ai-news-writer-ci / test (push) Successful in 55s
ai-news-writer-ci / test (push) Successful in 55s
fix(ci): drop lint from staging deploy; fix revert for merge commits (BIT-21923)
This commit was merged in pull request #21.
This commit is contained in:
commit
4175fe5b5c
1 file changed
+2
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user