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 8ba3416
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 3 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'

Check failure on line 9 in .github/workflows/gh-pages.yml

View workflow job for this annotation

GitHub Actions / lint

Must use plain style scalar
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
3 changes: 0 additions & 3 deletions netlify.toml

This file was deleted.

0 comments on commit 8ba3416

Please sign in to comment.