Skip to content

Commit

Permalink
fix gh pages deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-w committed May 13, 2024
1 parent 558bf55 commit 63b0edd
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 11 deletions.
44 changes: 34 additions & 10 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,41 @@
name: React app deployment
name: Deploy React App to Github Pages

on:
push:
branches:
- main
branches: ["main"]

jobs:
build:
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Deploy react app to github pages
uses: tanwanimohit/[email protected]
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '21.x'
- run: npm ci
- run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: 'build'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "the-game",
"version": "0.1.0",
"homepage": "https://leon-w.github.io/the-game",
"private": true,
"dependencies": {
"@types/node": "^16.18.97",
Expand Down Expand Up @@ -38,4 +39,4 @@
"last 1 safari version"
]
}
}
}

0 comments on commit 63b0edd

Please sign in to comment.