Skip to content

feat: port

feat: port #54

Workflow file for this run

name: docs CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
# 拉取代码
- uses: actions/checkout@v3
# 安装依赖
- uses: actions/setup-node@v3
with:
node-version: 14
# 打包
- name: build
run: |
cd packages/antd-mobile-ui-docs
npm install
npm run build-doc
- name: 查看当前目录
run: ls
- name: Deploy github pages
uses: peaceiris/actions-gh-pages@v3
with:
external_repository: dumuzhou/dumuzhou.github.io
personal_token: ${{ secrets.PERSONAL_TOKEN }}
publish_branch: master
publish_dir: ./packages/antd-mobile-ui-docs/dist
# 安装ssh 密钥
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
name: id_rsa
key: ${{ secrets.SSH_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}
if_key_exists: fail
- name: upload
env:
HOST: ${{ secrets.HOST }}
run: |
# 上传
rsync -rz packages/antd-mobile-ui-docs/dist/ root@$HOST:~/myDocker/nginx/antd-mobile-ui/www/
# 构建docker
ssh root@$HOST "cd /root/myDocker/nginx;/root/myDocker/nginx/build.sh"
ssh root@$HOST "cd /root/myCompose;/root/myCompose/build.sh"