feat: füge Skript hinzu, um 'review: true' in Skripten zu ersetzen und unterstütze einen Dry-Run-Modus
All checks were successful
Deploy to production / deploy (push) Successful in 18s
All checks were successful
Deploy to production / deploy (push) Successful in 18s
This commit is contained in:
@@ -115,7 +115,15 @@ jobs:
|
||||
- name: Sync vocab course content
|
||||
if: steps.vocab_course_changes.outputs.changed == 'true' || steps.vocab_course_changes.outputs.force_deploy == 'true'
|
||||
run: |
|
||||
# Decide whether to actually run the phase3 update on the server.
|
||||
# By default we run the deploy script in --dry-run mode. To enable the
|
||||
# actual run set the secret PHASE3_UPDATE=1 in the repo settings.
|
||||
RUN_FLAG="--dry-run"
|
||||
if [ "${{ secrets.PHASE3_UPDATE:-}}" = "1" ]; then
|
||||
RUN_FLAG=""
|
||||
fi
|
||||
|
||||
ssh -i ~/.ssh/id_ed25519 \
|
||||
-p "${{ secrets.PROD_PORT }}" \
|
||||
"${{ secrets.PROD_USER }}@${{ secrets.PROD_HOST }}" \
|
||||
"cd /opt/yourpart && npm --prefix backend run sync:vocab-courses"
|
||||
"cd /opt/yourpart && npm --prefix backend run sync:vocab-courses && if [ -x backend/scripts/deploy-phase3-update.sh ]; then bash backend/scripts/deploy-phase3-update.sh $RUN_FLAG; else echo 'deploy-phase3-update.sh not found or not executable'; fi"
|
||||
|
||||
Reference in New Issue
Block a user