Skip to content

Commit

Permalink
added serve
Browse files Browse the repository at this point in the history
  • Loading branch information
yashj09 committed Dec 24, 2023
1 parent 46ac482 commit 01d418c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ jobs:
- name: Set up Node.js
uses: actions/[email protected]
with:
node-version: '14.x'
node-version: "14.x"
- name: Install dependencies
run: npm install
- name: Store API key in .env file
run: echo "REACT_APP_API_KEY=${{ secrets.API_KEY }}" >> .env
- name: Build and deploy
run: |
npm run build
npm run deploy
- name: Build
run: npm run build
- name: Install serve
run: npm install -g serve
- name: Deploy
run: serve -s build
env:
REACT_APP_API_KEY: ${{ secrets.API_KEY }}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"deploy": "serve -s build"
"deploy": "npx serve -s build"
},
"eslintConfig": {
"extends": [
Expand All @@ -47,6 +47,7 @@
]
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11"
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"serve": "^11.3.2"
}
}

0 comments on commit 01d418c

Please sign in to comment.