fix(ci): remove maintenance mode steps blocking deploy
Generic: Project CI / Tests (push) Blocked by required conditions
deploy-mokogitea.yml / deploy (push) Waiting to run
Generic: Repo Health / Access control (push) Waiting to run
Generic: Repo Health / Scripts governance (push) Blocked by required conditions
Generic: Repo Health / Repository health (push) Blocked by required conditions
Generic: Repo Health / Site Health (push) Waiting to run
Generic: Repo Health / Report Issues (push) Blocked by required conditions
Generic: Project CI / Lint & Validate (push) Successful in 28s

This commit is contained in:
Jonathan Miller
2026-06-09 12:35:06 -05:00
parent 45a0338fc3
commit e7e2c5f7a2
-29
View File
@@ -73,20 +73,6 @@ jobs:
echo "instance_url=https://git.dev.mokoconsulting.tech" >> $GITHUB_OUTPUT
fi
- name: Enable maintenance mode
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
INSTANCE_URL: ${{ steps.config.outputs.instance_url }}
MAINT_ON: key=instance.maintenance_mode&value=%7B%22AdminWebAccessOnly%22%3Atrue%7D
run: |
echo "Enabling maintenance mode on ${INSTANCE_URL}..."
curl -sf -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/x-www-form-urlencoded" \
"${INSTANCE_URL}/-/admin/config" \
-d "${MAINT_ON}" \
|| echo "WARNING: Could not enable maintenance mode (instance may be down)"
- name: Write deploy key
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
@@ -256,21 +242,6 @@ jobs:
print(f"updates.xml updated to {moko_ver}")
PYEOF
- name: Disable maintenance mode
if: always()
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
INSTANCE_URL: ${{ steps.config.outputs.instance_url }}
MAINT_OFF: key=instance.maintenance_mode&value=%7B%22AdminWebAccessOnly%22%3Afalse%7D
run: |
echo "Disabling maintenance mode on ${INSTANCE_URL}..."
curl -sf -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/x-www-form-urlencoded" \
"${INSTANCE_URL}/-/admin/config" \
-d "${MAINT_OFF}" \
|| echo "WARNING: Could not disable maintenance mode"
- name: Verify
run: |
sleep 5