diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 86bfb9e..7036cd3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,18 +1,17 @@ name: Deploy on: - push: - branches: - - main + release: + types: [created] + + workflow_dispatch: jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - with: - fetch-depth: 0 - + - uses: pnpm/action-setup@v2 name: Install pnpm id: pnpm-install @@ -25,27 +24,27 @@ jobs: shell: bash run: | echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + - - uses: actions/setup-node@v3 + - name: Set node + uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 16.x cache: pnpm - - name: Install Packages - - run: pnpm i --frozen-lockfile + - name: Install + run: pnpm i - name: Lint run: pnpm run lint - - - deploy: + + build: needs: lint + name: Github Page Deploy runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - with: - fetch-depth: 0 - + - uses: pnpm/action-setup@v2 name: Install pnpm id: pnpm-install @@ -58,20 +57,16 @@ jobs: shell: bash run: | echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + - - uses: actions/setup-node@v3 + - name: Set node + uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 16.x cache: pnpm - - name: Install Packages - - run: pnpm i --frozen-lockfile + - name: Install + run: pnpm i --frozen-lockfile - name: Build - run: yarn docs:build - - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: docs/.vitepress/dist + run: pnpm docs:build