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
Fix: Allow mission board failure in staging; clarify PAT
The workflow now continues on error for the mission board update.
CONTRIBUTING.md updated with explanation of PAT.
Copy file name to clipboardExpand all lines: CONTRIBUTING-Staging.MD
+20-15Lines changed: 20 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,6 @@ Before your fork can deploy a staging site, you must enable GitHub Pages and set
19
19
20
20

21
21
22
-
23
22
#### Step 2: Create a Local `staging` Branch
24
23
25
24
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.
@@ -54,23 +53,30 @@ git push origin staging
54
53
55
54
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.
56
55
57
-
## Handling the `PAT_FOR_ISSUES` Secret
56
+
## Optional: Enabling the Mission Board on Your Staging Site
58
57
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).
58
+
Our website includes a "Mission Board" page that automatically fetches open issues from various community projects using the GitHub API. This process requires a Personal Access Token (PAT) stored in a secret called `PAT_FOR_ISSUES`.
60
59
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.
60
+
While the main repository has this secret, your fork does not. The build workflow is configured to `continue-on-error`, so the build will succeed, and your site will deploy correctly. However, the Mission Board page on your staging site will not be updated with the latest issues.
62
61
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.
62
+
If you need to test the full functionality of the Mission Board on your staging site, you can create your own PAT and add it to your fork:
64
63
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
-
```
64
+
1.**Generate a Personal Access Token:**
65
+
*Go to your GitHub **Developer settings** > **Personal access tokens** > **Tokens (classic)**.
66
+
*Click **Generate new token**.
67
+
*Give it a descriptive name (e.g., "ONM Mission Board").
68
+
*Set an expiration date.
69
+
*Under **Scopes**, select the `public_repo` scope. This is all that's needed.
70
+
* Click **Generate token** and copy the token value.
72
71
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.
72
+
2.**Add the Secret to Your Fork:**
73
+
* Navigate to your forked repository's **Settings** > **Secrets and variables** > **Actions**.
74
+
* Click **New repository secret**.
75
+
* Set the **Name** to `PAT_FOR_ISSUES`.
76
+
* Paste your copied token into the **Value** field.
77
+
* Click **Add secret**.
78
+
79
+
After setting this up, future deployments from your `staging` branch will have a fully functional and up-to-date Mission Board.
74
80
75
81
## Resetting Your Staging Branch
76
82
@@ -111,8 +117,7 @@ To ensure links work correctly in both production and staging environments, alwa
0 commit comments