Skip to content

Commit

Permalink
ci: set up github actions to auto-deploy pages and delete gh-pages deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Famozzy committed Nov 28, 2024
1 parent 6b8383d commit e13e624
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 190 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
run_install: true
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'
- name: Lint
run: pnpm run lint
- name: Build
run: pnpm run build
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.TOKEN }}
cname: famozzy.dev
publish_dir: ./dist
publish_branch: gh-pages
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
"build": "tsc && vite build",
"lint": "eslint src/**/*.{ts,tsx} --quiet",
"preview": "vite preview",
"format": "prettier --write src/",
"predeploy": "npm run build",
"deploy": "gh-pages -d dist"
"format": "prettier --write src/"
},
"dependencies": {
"jotai": "^2.8.0",
Expand All @@ -27,7 +25,6 @@
"cz-conventional-changelog": "^3.3.0",
"eslint": "^9.1.1",
"eslint-plugin-react": "^7.34.1",
"gh-pages": "^6.1.1",
"globals": "^15.1.0",
"postcss": "^8.4.38",
"prettier": "^3.2.5",
Expand Down
Loading

0 comments on commit e13e624

Please sign in to comment.