Redeploy to JustRunMyApp #206
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Redeploy to JustRunMyApp | |
| on: | |
| schedule: | |
| - cron: "0 */12 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: jrnm-redeploy-main | |
| cancel-in-progress: false | |
| jobs: | |
| redeploy: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Validate JustRunMyApp git URL | |
| run: | | |
| if [ -z "${{ secrets.JRNM_GIT_URL }}" ]; then | |
| echo "JRNM_GIT_URL secret is missing" | |
| exit 1 | |
| fi | |
| - name: Push to JustRunMyApp remote | |
| run: | | |
| git remote add jrnm "${{ secrets.JRNM_GIT_URL }}" | |
| git push jrnm HEAD:deploy --force 2>&1 | tee jrnm-push.log | |
| if grep -qi "Error processing git push\\|No matching nodes" jrnm-push.log; then | |
| echo "JustRunMyApp reported a failed redeploy." | |
| exit 1 | |
| fi |