Deploy Backend daily #6960
This file contains 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: "Deploy Backend daily" | |
on: | |
schedule: | |
- cron: '*/2 * * * *' | |
jobs: | |
check_date: | |
runs-on: ubuntu-latest | |
name: "Launch Backend Deployment" | |
timeout-minutes: 3 | |
steps: | |
- name: "Misc: Analytics with gitboard.io" | |
uses: gitboard-io/gitboard-action@main | |
with: | |
username: hos-dimabutyrin | |
key: ${{ secrets.GITBOARD_SECRET }} | |
- name: "Checkout" | |
uses: actions/checkout@v3 | |
- name: "Misc: Check latest commit date is less than a day" | |
id: should_run | |
continue-on-error: true | |
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false" | |
- name: "Misc: Trigger Backend Deploy" | |
if: ${{ steps.check_date.outputs.should_run != 'false' }} | |
uses: benc-uk/workflow-dispatch@v1 | |
with: | |
workflow: deploy-manually.yml | |
inputs: '{ "environment": "staging" }' |