Update deploy.yml #1
This file contains 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-website | |
on: | |
push: | |
branches: [ "master" ] | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: "18.X" | |
- name: Install pnpm | |
run: npm install -g pnpm | |
- name: Install deps | |
run: pnpm install --no-frozen-lockfile | |
- name: Modify "base" from vite.config.ts | |
run: | | |
sed -i 's|base: "./"|base: "/gallery"|' vite.config.ts | |
- name: build app | |
run: pnpm run build | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.PAT_TOKEN }} | |
publish_dir: ./dist | |
publish_branch: gh-pages | |
dotfiles: true |