2022-04-15 10:01:46 +00:00
|
|
|
name: Deploy to staging
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
name: Deploy to staging
|
|
|
|
runs-on: ubuntu-latest
|
2022-04-15 10:34:46 +00:00
|
|
|
timeout-minutes: 5 # Try for 5 minutes, then give up
|
2022-04-15 10:01:46 +00:00
|
|
|
steps:
|
2022-04-15 10:34:46 +00:00
|
|
|
- name: 'Wait for status checks'
|
|
|
|
uses: "WyriHaximus/github-action-wait-for-status@v2"
|
|
|
|
id: waitforstatuschecks
|
2022-04-15 10:01:46 +00:00
|
|
|
with:
|
2022-04-15 10:34:46 +00:00
|
|
|
ignoreActions: Deploy to staging
|
|
|
|
checkInterval: 10
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
2022-04-15 10:01:46 +00:00
|
|
|
- name: git-checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Push
|
|
|
|
uses: ad-m/github-push-action@master
|
2022-04-15 10:34:46 +00:00
|
|
|
if: steps.waitforstatuschecks.outputs.status == 'success'
|
2022-04-15 10:01:46 +00:00
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
branch: staging
|
|
|
|
force: true
|