Skip to content

Commit

Permalink
Add deploy.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Com6235 committed Jun 23, 2024
1 parent 4299a29 commit 06154f9
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: deploy.yaml
on:
push:
branches:
- master
jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 22.x
cache: yarn

- name: Install dependencies
run: yarn install --immutable --immutable-cache --check-cache

- name: Build website
run: yarn run gh-pages

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"build": "tsc -b && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"tailwind": "tailwind.cmd -i .\\src\\assets\\App.css -o .\\src\\assets\\taiwind.css -w"
"tailwind": "tailwind.cmd -i .\\src\\assets\\App.css -o .\\src\\assets\\taiwind.css -w",
"gh-pages": "tsc -b && vite build --base \"reactTest\""
},
"dependencies": {
"react": "^18.3.1",
Expand Down

0 comments on commit 06154f9

Please sign in to comment.