remove vid #3
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 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: false | |
| fetch-depth: 1 | |
| - name: Fetch LFS files | |
| run: git lfs pull --include="public/**" | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: latest | |
| - name: Determine node version | |
| id: nvm | |
| run: | | |
| if [ -f .nvmrc ]; then | |
| echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT | |
| else | |
| echo "NVMRC=18" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ steps.nvm.outputs.NVMRC }} | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Run formatter | |
| run: pnpm format | |
| - name: Run linter | |
| run: pnpm lint | |
| - name: Run unit tests | |
| run: pnpm test | |
| - name: Build assets | |
| run: pnpm build | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./dist | |
| publish_branch: gh-pages |