Skip to content

Update README.md

Update README.md #274

Workflow file for this run

name: Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Download Source file
uses: actions/checkout@v2
with:
ref: source
- name: Prepare Node env
uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Set env
env:
ACTION_DEPLOY_KEY: ${{ secrets.ACTION_DEPLOY_KEY }}
run: |
mkdir -p ~/.ssh/
echo "$ACTION_DEPLOY_KEY" | tr -d '\r' > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts
- name: Vuepress
run: |
yarn
yarn run docs:build
cp README.md docs/.vuepress/dist
cd docs/.vuepress/dist
git config --global user.name 'Fluid-dev'
git config --global user.email '[email protected]'
git init
git add -A
git commit -m 'Update'
git push -f [email protected]:fluid-dev/hexo-fluid-docs.git master
- name: Turnstyle
uses: softprops/turnstyle@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup qshell
uses: foxundermoon/setup-qshell@v5
with:
version: '2.12.0'
- name: Upload to OSS
env:
QINIU_ACCESSKEY: ${{ secrets.QINIU_ACCESSKEY }}
QINIU_SECRETKEY: ${{ secrets.QINIU_SECRETKEY }}
QINIU_BUCKET: 'fluid-dev'
run: |
rm -rf ./docs/.vuepress/dist/.git
sed -i 's/\/hexo-fluid-docs\//\/docs\//g' `grep 'hexo-fluid-docs' -rl ./docs/.vuepress/dist/*`
qshell account $QINIU_ACCESSKEY $QINIU_SECRETKEY action
qshell listbucket $QINIU_BUCKET -o bucket.txt
awk -F '\t' '/docs\// {print $1}' bucket.txt > to_delete.txt
qshell batchdelete -F'\t' --force $QINIU_BUCKET -i to_delete.txt
qshell qupload2 --src-dir=./docs/.vuepress/dist --bucket=$QINIU_BUCKET --key-prefix=docs/ --overwrite
echo 'https://fluid-dev.com/docs/\nhttps://hexo.fluid-dev.com/docs/' >> cdnrefresh.txt
qshell cdnrefresh --dirs -i cdnrefresh.txt