Skip to content

1.5.4

1.5.4 #77

Workflow file for this run

name: Build and Deploy Docs
on:
push:
branches:
- main
- v*
tags-ignore:
- v*
paths:
- .dumi/**
- docs/**
- src/**
- .umirc.ts
- .github/**
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install
run: pnpm install
- name: Build package
run: pnpm build
- name: Generator assets
run: pnpm generator:assets
- name: Build latest docs
if: ${{github.ref == 'refs/heads/main'}}
run: pnpm run docs:build
- name: Deploy latest docs
if: ${{github.ref == 'refs/heads/main'}}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.ACCESS_TOKEN_WORKFLOW }}
publish_dir: docs-dist
destination_dir: latest
- name: Build version docs
if: ${{github.ref != 'refs/heads/main'}}
run: pnpm docs-version:build
- name: Deploy version docs
if: ${{github.ref != 'refs/heads/main'}}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.ACCESS_TOKEN_WORKFLOW }}
publish_dir: docs-dist
destination_dir: ${{github.ref}}