🐎 ci(docs.yml): 发布githubpage #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Docs | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
registry-url: 'https://registry.npmjs.org' | |
scope: '@marherb-work' | |
- name: Install dependencies | |
run: yarn install | |
- name: Build package | |
run: yarn cosmos-export | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./cosmos-export |