You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING-Staging.MD
+23-5Lines changed: 23 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,13 +12,14 @@ The process involves using a dedicated `staging` branch on your personal fork of
12
12
13
13
Before your fork can deploy a staging site, you must enable GitHub Pages and set the build source to GitHub Actions. You only need to do this once per fork.
14
14
15
-

16
-
17
15
1. Navigate to your forked repository on GitHub.
18
16
2. Go to the **Settings** tab.
19
17
3. In the left sidebar, click on **Pages**.
20
18
4. Under the **Build and deployment** section, select **GitHub Actions** from the **Source** dropdown menu. The configuration will be handled automatically by the workflow file in the repository.
21
19
20
+

21
+
22
+
22
23
#### Step 2: Create a Local `staging` Branch
23
24
24
25
If you don't already have one, create a local `staging` branch. It's best to base this off the latest version of the main repository's `main` branch.
@@ -53,25 +54,42 @@ git push origin staging
53
54
54
55
Pushing to the `staging` branch triggers the `Deploy Hugo site to Pages` GitHub Action. Once the action completes, your staging site will be live. You can find the URL in your fork's repository settings on the same **Settings > Pages** screen you configured in Step 1.
55
56
57
+
## Handling the `PAT_FOR_ISSUES` Secret
58
+
59
+
Our GitHub Actions workflow includes a step to automatically update the "Mission Board" by fetching open issues from project repositories. This step requires a secret key called `PAT_FOR_ISSUES` (a Personal Access Token).
60
+
61
+
Since forks do not have this secret, the **"Update Mission Board" step will fail, causing the entire build to stop.** This will prevent your staging site from deploying.
62
+
63
+
**To fix this**, you can simply tell the workflow to continue even if this specific step fails. Add `continue-on-error: true` to the "Update Mission Board" step in the `.github/workflows/main.yml` file within your `staging` branch.
64
+
65
+
```yaml
66
+
- name: Update Mission Board
67
+
env:
68
+
PAT_FOR_ISSUES: ${{ secrets.PAT_FOR_ISSUES }}
69
+
run: npm run update-mission-board
70
+
continue-on-error: true # Add this line
71
+
```
72
+
73
+
This change ensures that a failure in fetching issues won't block the deployment of your staging site. The Mission Board page on your preview site may not have the latest issues, but the rest of the site will build and deploy correctly.
74
+
56
75
## Resetting Your Staging Branch
57
76
58
-
Sometimes, you may need to start fresh with a new staging environment, especially if your previous staging branch contains changes you no longer need or if it has diverged significantly from the main project.
77
+
Sometimes, you may need to start fresh with a new staging environment.
59
78
60
79
1. **Delete the Remote `staging` Branch:**
61
80
```bash
62
81
git push origin --delete staging
63
82
```
64
83
65
84
2. **Recreate the Branch Locally:**
66
-
Delete your local`staging` branch, then create a new one based on the latest `upstream/main`.
67
85
```bash
68
86
git branch -D staging
69
87
git fetch upstream
70
88
git checkout -b staging upstream/main
71
89
```
72
90
73
91
3. **Merge New Features and Push:**
74
-
You can now merge your new feature branches into this clean `staging` branch and push to your fork as described in the workflow above. A `force push` might be necessary if you are overwriting an existing branch with a different history.
92
+
You can now merge your new feature branches and push to your fork. A `force push` might be necessary if you are overwriting an existing branch with a different history.
0 commit comments