revamp personal site #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Vite React App to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - master # Change to 'main' if your default branch is 'main' | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install Dependencies | |
| run: npm ci | |
| - name: Build and Deploy | |
| run: npm run deploy | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./ | |
| exclude_assets: | | |
| .git | |
| .github | |
| node_modules | |
| src | |
| public | |
| build | |
| .gitignore | |
| package.json | |
| package-lock.json | |
| tsconfig.json | |
| tsconfig.node.json | |
| vite.config.ts | |
| vite-plugin-save-content.ts | |
| README.md | |