Skip to content

sphinx-removeold

sphinx-removeold #3

name: sphinx-removeold
on: [workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: publish
env:
OSS_CONFIG: ${{ secrets.OSS_CONFIG }}
OSS_NAME: ${{ secrets.OSS_NAME }}
run: |
sudo apt update
sudo pip3 install setuptools
sudo pip3 install -r requirements.txt
cd ..
sphinx-build -b html luatos-wiki output -E
wget http://gosspublic.alicdn.com/ossutil/1.7.1/ossutil64
sudo chmod 755 ossutil64
echo -e "${OSS_CONFIG}" > ~/.ossutilconfig
./ossutil64 rm oss://${OSS_NAME}/ -r -f
./ossutil64 cp -u -r -j 20 output/ oss://${OSS_NAME}/
cp -r output/ luatos-wiki/
cd luatos-wiki/output/
echo "此文档为离线版,请访问wiki.luatos.com获取最新版本,文档更新时间:$(TZ=UTC-8 date +%Y-%m-%d,%H:%m:%S)" > "请先读我.txt"
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: output
path: output