Skip to content

Commit 3dab643

Browse files
committed
Fix: use environment variables directly instead of GitHub CLI
1 parent 50b29f6 commit 3dab643

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

.github/workflows/deploy.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,13 @@ jobs:
3535
- name: Install dependencies
3636
run: npm ci
3737

38-
- name: Create .env file
39-
run: |
40-
echo "REACT_APP_GITHUB_TOKEN=${{ secrets.REACT_APP_GITHUB_TOKEN }}" > .env
41-
echo "REACT_APP_GITHUB_OWNER=hirosystems" >> .env
42-
echo "REACT_APP_GITHUB_REPO=hiro-experience-map" >> .env
43-
echo "REACT_APP_GITHUB_PROJECT_NUMBER=58" >> .env
44-
4538
- name: Build
46-
run: |
47-
npm run build || (echo "Build failed" && exit 1)
48-
ls -la build/
39+
env:
40+
REACT_APP_GITHUB_TOKEN: ${{ secrets.REACT_APP_GITHUB_TOKEN }}
41+
REACT_APP_GITHUB_OWNER: hirosystems
42+
REACT_APP_GITHUB_REPO: hiro-experience-map
43+
REACT_APP_GITHUB_PROJECT_NUMBER: 58
44+
run: npm run build
4945

5046
- name: Setup Pages
5147
uses: actions/configure-pages@v4

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
"typescript": "^4.9.5"
2121
},
2222
"scripts": {
23-
"start": "gh secret set REACT_APP_GITHUB_TOKEN --env-file .env && react-scripts start",
24-
"build": "gh secret set REACT_APP_GITHUB_TOKEN --env-file .env && react-scripts build",
23+
"start": "react-scripts start",
24+
"build": "react-scripts build",
2525
"test": "react-scripts test",
2626
"eject": "react-scripts eject",
2727
"predeploy": "npm run build",

0 commit comments

Comments
 (0)