Skip to content

Commit adc0d6d

Browse files
authored
Merge pull request #202 from the-hideout/ci-deployment-updates
Deployment Updates - CI
2 parents 970b837 + ccebb4f commit adc0d6d

File tree

3 files changed

+61
-0
lines changed

3 files changed

+61
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,23 @@ permissions:
99
contents: read
1010

1111
jobs:
12+
deployment-check:
13+
runs-on: ubuntu-latest
14+
outputs: # set outputs for use in downstream jobs
15+
continue: ${{ steps.deployment-check.outputs.continue }}
16+
17+
steps:
18+
# https://github.com/github/branch-deploy/blob/d3c24bd92505e623615b75ffdfac5ed5259adbdb/docs/merge-commit-strategy.md
19+
- name: deployment check
20+
uses: github/[email protected]
21+
id: deployment-check
22+
with:
23+
merge_deploy_mode: "true"
24+
environment: production
25+
1226
deploy:
27+
if: ${{ needs.deployment-check.outputs.continue == 'true' }}
28+
needs: deployment-check
1329
environment: production
1430
runs-on: ubuntu-latest
1531

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# https://github.com/github/branch-deploy/blob/d3c24bd92505e623615b75ffdfac5ed5259adbdb/docs/unlock-on-merge.md
2+
3+
name: Unlock On Merge
4+
5+
on:
6+
pull_request:
7+
types: [closed]
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
unlock-on-merge:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: unlock on merge
18+
uses: github/[email protected]
19+
id: unlock-on-merge
20+
with:
21+
unlock_on_merge_mode: "true" # <-- indicates that this is the "Unlock on Merge Mode" workflow
22+
environment_targets: production,development

docs/maintainer-notes.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Maintainer Notes
2+
3+
This is a living document for the maintainers of this repository.
4+
5+
## Deployment Process
6+
7+
This is a simple run down of how review / deploy a pull request.
8+
9+
1. A pull request is opened
10+
2. We review the code
11+
3. We comment `.deploy to development` and ensure the creator of the pull request is happy with the changes
12+
4. We comment `.deploy` to deploy to production. We "let it bake" and ensure everything is working as expected for a few minutes to a few days depending on the complexity of the changes.
13+
5. We approve the pull request and merge it into `main`
14+
15+
> It should be noted that the approval step can come before the deployment steps if that suits the situation better.
16+
17+
## CI Failures
18+
19+
A known issue (I am not sure of the cause) for CI failures is when dependabot opens a pull request. For some very strange reason, the necessary secrets are not injected into the Actions workflow when the pull request comes from dependabot. This causes the wrangler environment in CI to fail because it lacks the proper credentials to authenticate with Cloudflare.
20+
21+
The fix: Simply push a commit to the branch in question. It can be an empty commit if you like. This will trigger the CI workflow again and the secrets will be injected properly.
22+
23+
IDK why this happens, but it does. ¯\\\_(ツ)\_

0 commit comments

Comments
 (0)