Skip to content

Commit 98fa68d

Browse files
committed
docs: Update CONTRIBUTING-Staging.MD and workflow
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.
1 parent c95cc5a commit 98fa68d

File tree

2 files changed

+21
-15
lines changed

2 files changed

+21
-15
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ jobs:
7878
env:
7979
PAT_FOR_ISSUES: ${{ secrets.PAT_FOR_ISSUES }}
8080
run: npm run update-mission-board
81+
continue-on-error: true
8182

8283
# 4. Dynamically configure the site's baseURL based on the deployment branch.
8384
- name: Determine Base URL

CONTRIBUTING-Staging.MD

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Before your fork can deploy a staging site, you must enable GitHub Pages and set
1919

2020
![img.png](static/images/img.png)
2121

22-
2322
#### Step 2: Create a Local `staging` Branch
2423

2524
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
5453

5554
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.
5655

57-
## Handling the `PAT_FOR_ISSUES` Secret
56+
## Optional: Enabling the Mission Board on Your Staging Site
5857

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`.
6059

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.
6261

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:
6463

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.
7271

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.
7480

7581
## Resetting Your Staging Branch
7682

@@ -111,8 +117,7 @@ To ensure links work correctly in both production and staging environments, alwa
111117
112118
**Robust Method (Recommended):**
113119
```go-html-template
114-
{{ $page := site.GetPage "path/to/page"; $page.RelPermalink }}
115-
```
120+
{{ $page := site.GetPage "path/to/page"; $page.RelPermalink }}```
116121
117122
**Fragile Method (Avoid):**
118123
```go-html-template

0 commit comments

Comments
 (0)