|
| 1 | +# Note(ethanjli): This CI workflow is a temporary measure to automatically synchronize the |
| 2 | +# docs-staging & docs-prod repos with the master branch of the docs repo, so that @beniroquai can |
| 3 | +# deploy all changes directly to staging & production. Once we stabilize our staging & prod |
| 4 | +# deployments, we should delete this CI workflow! |
| 5 | +--- |
| 6 | +name: release channel (dev) |
| 7 | +on: |
| 8 | + push: |
| 9 | + branches: |
| 10 | + - 'master' |
| 11 | + - 'main' |
| 12 | + - 'edge' |
| 13 | + tags: |
| 14 | + - 'v[0-9]+.[0-9]+.[0-9]+-dev.*' |
| 15 | + - 'v[0-9]+.[0-9]+.[0-9]+-beta.*' |
| 16 | + # We want to advance the dev branch to the latest stable release, too: |
| 17 | + - 'v[0-9]+.[0-9]+.[0-9]+' |
| 18 | + |
| 19 | +jobs: |
| 20 | + ff-branch-staging: |
| 21 | + runs-on: ubuntu-latest |
| 22 | + permissions: |
| 23 | + contents: write |
| 24 | + steps: |
| 25 | + - uses: lewagon/wait-on-check-action@v1.3.4 |
| 26 | + with: |
| 27 | + ref: ${{ github.ref }} |
| 28 | + check-name: 'build' |
| 29 | + repo-token: ${{ secrets.GITHUB_TOKEN }} |
| 30 | + wait-interval: 10 |
| 31 | + |
| 32 | + - uses: actions/checkout@v4 |
| 33 | + with: |
| 34 | + fetch-depth: 0 |
| 35 | + |
| 36 | + - run: | |
| 37 | + git checkout staging |
| 38 | + git merge --ff-only ${{ github.ref_name }} |
| 39 | +
|
| 40 | + - uses: ad-m/github-push-action@v0.8.0 |
| 41 | + with: |
| 42 | + branch: staging |
| 43 | + |
| 44 | + sync-repo-staging: |
| 45 | + # We call this workflow manually because it doesn't appear to be triggered automatically by a |
| 46 | + # push of the dev branch from the ff-branch job: |
| 47 | + uses: ./.github/workflows/sync-repo-staging.yml |
| 48 | + needs: ff-branch-staging |
| 49 | + secrets: inherit |
| 50 | + |
| 51 | + ff-branch-prod: |
| 52 | + runs-on: ubuntu-latest |
| 53 | + permissions: |
| 54 | + contents: write |
| 55 | + steps: |
| 56 | + - uses: lewagon/wait-on-check-action@v1.3.4 |
| 57 | + with: |
| 58 | + ref: ${{ github.ref }} |
| 59 | + check-name: 'build' |
| 60 | + repo-token: ${{ secrets.GITHUB_TOKEN }} |
| 61 | + wait-interval: 10 |
| 62 | + |
| 63 | + - uses: actions/checkout@v4 |
| 64 | + with: |
| 65 | + fetch-depth: 0 |
| 66 | + |
| 67 | + - run: | |
| 68 | + git checkout prod |
| 69 | + git merge --ff-only ${{ github.ref_name }} |
| 70 | +
|
| 71 | + - uses: ad-m/github-push-action@v0.8.0 |
| 72 | + with: |
| 73 | + branch: prod |
| 74 | + |
| 75 | + sync-repo-prod: |
| 76 | + # We call this workflow manually because it doesn't appear to be triggered automatically by a |
| 77 | + # push of the dev branch from the ff-branch job: |
| 78 | + uses: ./.github/workflows/sync-repo-prod.yml |
| 79 | + needs: ff-branch-prod |
| 80 | + secrets: inherit |
0 commit comments