Skip to content

Publish

Publish #155

Workflow file for this run

# 构建和发布官网
name: Build and Deploy Docs Website
on:
push:
tags:
- 'v*'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: '9'
- name: Install Dependencies
run: pnpm install
- name: Build Docs
run: pnpm docs:build
- name: Check Tag for Beta
id: check_tag
run: |
TAG=$(echo ${GITHUB_REF} | sed 's|refs/tags/||')
echo "TAG=${TAG}" >> $GITHUB_ENV
echo "Current TAG: ${TAG}"
- name: Sync to GitLab for Beta
if: contains(env.TAG, 'beta') == true
uses: wearerequired/git-mirror-action@v1
env:
SSH_PRIVATE_KEY: ${{ secrets.BUI_BETA_SSH_PRIVATE_KEY }}
with:
source-repo: '[email protected]:alibaba/bifrostui.git'
destination-repo: '[email protected]:alipay-movie-client/bifrostui-pre-release.git'
- name: Deploy to GitHub Pages
if: contains(env.TAG, 'beta') == false
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: docs-dist