diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 00000000..d27414bc --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,53 @@ +name: Github Page Docs +on: + push: + branches: + - main + workflow_dispatch: + +concurrency: + group: 'pages' + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set node + uses: actions/setup-node@v4 + with: + node-version: lts/* + + - name: Setup + run: npm i -g @antfu/ni + + - name: Install + run: nci + + - name: Build unplugin + run: nr build + + - name: Build docs + run: nr docs:build + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload Artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./docs/.vitepress/dist + + deploy: + needs: build + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages 🚀 + id: deployment + uses: actions/deploy-pages@v4 diff --git a/netlify.toml b/netlify.toml deleted file mode 100644 index 70cca052..00000000 --- a/netlify.toml +++ /dev/null @@ -1,3 +0,0 @@ -[build] -command = "pnpm build && pnpm docs:build" -publish = "docs/dist"