Skip to content

Commit

Permalink
ci: fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
imoyy committed Aug 9, 2024
1 parent 18b9015 commit 0ad2ea3
Showing 1 changed file with 9 additions and 22 deletions.
31 changes: 9 additions & 22 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,50 +11,37 @@ permissions:
contents: write

jobs:
build:

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

strategy:
matrix:
node-version: [18.x]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8
version: latest

- name: Setup Node.js
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 18.x
cache: 'pnpm'

- name: Cache pnpm modules
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-build-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-
- name: Install dependencies
run: pnpm install

- name: Build project
run: pnpm run build
env:
BASE_URL: /${{ github.event.repository.name }}/

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Deploy to GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .vitepress/dist
publish_dir: .vitepress/dist

env:
CI: true

0 comments on commit 0ad2ea3

Please sign in to comment.