Skip to content

Commit

Permalink
ci: deploy docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Mar 12, 2024
1 parent 43a35bc commit 6fb5709
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 4 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion docs/CNAME

This file was deleted.

2 changes: 2 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ module.exports = antfu(
ignores: [
'test-out/**',
'**/output.js',
'docs/showcase/*.md',
'docs/.vitepress/data/repository.json',
],
},
{
Expand Down
3 changes: 0 additions & 3 deletions netlify.toml

This file was deleted.

0 comments on commit 6fb5709

Please sign in to comment.