Skip to content

Commit 0df783a

Browse files
committed
Fix: Use valid secret names (cannot start with GITHUB_)
- Rename GITHUB_CLIENT_ID to OAUTH_CLIENT_ID (already exists) - Rename GITHUB_PAT to WORKFLOW_PAT - Update deployment workflow to use correct secret names - Update README with correct secret names - GitHub reserves GITHUB_ prefix for system secrets
1 parent f1ee111 commit 0df783a

2 files changed

Lines changed: 9 additions & 11 deletions

File tree

.github/workflows/deploy-pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ jobs:
3333
3434
const CONFIG = {
3535
// GitHub OAuth App Client ID
36-
GITHUB_CLIENT_ID: '${{ secrets.GITHUB_CLIENT_ID }}',
36+
GITHUB_CLIENT_ID: '${{ secrets.OAUTH_CLIENT_ID }}',
3737
3838
// GitHub Personal Access Token for triggering workflows
39-
GITHUB_PAT: '${{ secrets.GITHUB_PAT }}',
39+
GITHUB_PAT: '${{ secrets.WORKFLOW_PAT }}',
4040
4141
// Repository details
4242
REPO_OWNER: 'SingularityNET-Archive',

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,11 @@ For GitHub Pages to work, we need to add your credentials as secrets:
9090

9191
1. Go to **Settings****Secrets and variables****Actions**
9292
2. Click **"New repository secret"** and add:
93-
- **Name**: `GITHUB_CLIENT_ID`
94-
- **Value**: Your GitHub OAuth App Client ID from step 1
95-
3. Click **"New repository secret"** again and add:
96-
- **Name**: `GITHUB_PAT`
93+
- **Name**: `WORKFLOW_PAT`
9794
- **Value**: Your classic PAT from step 3
95+
3. (The `OAUTH_CLIENT_ID` secret should already exist from step 2)
9896

99-
**Note**: These secrets are used by the GitHub Actions deployment workflow to generate `config.js` during deployment.
97+
**Note**: These secrets are used by the GitHub Actions deployment workflow to generate `config.js` during deployment. Secret names cannot start with `GITHUB_` as that's reserved by GitHub.
10098

10199
### 6. Enable GitHub Pages with GitHub Actions
102100

@@ -215,13 +213,13 @@ This project includes a **GitHub Actions deployment workflow** (`.github/workflo
215213
3. ✅ Keeps your credentials secure (never in repository, only in secrets)
216214

217215
**How it works:**
218-
- You store `GITHUB_CLIENT_ID` and `GITHUB_PAT` as repository secrets
216+
- You store `OAUTH_CLIENT_ID` and `WORKFLOW_PAT` as repository secrets
219217
- The deployment workflow reads these secrets and creates `config.js` during build
220218
- GitHub Pages serves the site with the generated config file
221219
- Your credentials never appear in the repository or git history
222220

223221
**To deploy:**
224-
1. Add secrets `GITHUB_CLIENT_ID` and `GITHUB_PAT` (see step 5 in setup)
222+
1. Add secrets `OAUTH_CLIENT_ID` (step 2) and `WORKFLOW_PAT` (step 5)
225223
2. Enable GitHub Pages with source "GitHub Actions" (see step 6 in setup)
226224
3. Push to main branch - deployment happens automatically!
227225

@@ -232,8 +230,8 @@ This project includes a **GitHub Actions deployment workflow** (`.github/workflo
232230
If you see "The config.js file is missing or not loaded" on the deployed site:
233231

234232
1. **Add deployment secrets**: Go to Settings → Secrets → Actions and add:
235-
- `GITHUB_CLIENT_ID` (your OAuth App Client ID)
236-
- `GITHUB_PAT` (your classic PAT)
233+
- `OAUTH_CLIENT_ID` (your OAuth App Client ID)
234+
- `WORKFLOW_PAT` (your classic PAT)
237235
2. **Enable GitHub Actions for Pages**: Settings → Pages → Source: "GitHub Actions"
238236
3. **Trigger deployment**: Push to main branch or go to Actions tab and run "Deploy to GitHub Pages" manually
239237
4. **Wait for deployment**: Check the Actions tab to see deployment progress (takes 2-3 minutes)

0 commit comments

Comments
 (0)