If you're deploying locally rather than through GitHub Actions, follow these steps:
-
Make sure you have the gh-pages package installed:
npm install --save-dev gh-pages
-
Configure your Git identity locally:
git config --global user.name "Your Name" git config --global user.email "your.email@example.com"
-
Build and deploy your project:
npm run build npm run deploy
If the gh-pages package is causing issues, you can deploy manually:
-
Build your project:
npm run build
-
Create a new orphan branch for GitHub Pages:
git checkout --orphan gh-pages git rm -rf .
-
Copy your dist folder contents to the root and commit:
cp -r dist/* . git add . git commit -m "Deploy to GitHub Pages" git push origin gh-pages --force
-
Switch back to your main branch:
git checkout main
Make sure your GitHub repository is configured to use the gh-pages branch for GitHub Pages:
- Go to your repository on GitHub
- Navigate to Settings > Pages
- Select "Deploy from a branch" under Source
- Select "gh-pages" branch and "/ (root)" folder
- Click Save
Your site should be live at https://skunkworks-io.github.io/Capability-Portfolio/