-
Notifications
You must be signed in to change notification settings - Fork 314
49 lines (43 loc) · 1.46 KB
/
pre.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: dev
on:
release:
types: [prereleased]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build "
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Md2md
run: |
cp site/en/Variables.json ./
mv site doc_from
sudo npm install @zilliz/mdtomd -g
goover
rm -rf doc_from/*
rm check-link.js
mv doc_to site
- name: Delete And Push
run: |
sudo apt-get update
sudo apt-get install jq
cd ../
git clone https://.:${{ secrets.P_GITHUB_TOKEN }}@github.com/milvus-io/web-content.git target
git config --global user.email "[email protected]"
git config --global user.name "Milvus-doc-bot"
cp ./milvus-docs/version.json ./target
cd target
rm -rf preview
mkdir preview
cp -avr ../milvus-docs/** ./preview
git add .
git commit -m "Release new docs preview"
git push -f origin master