Update deploy.yml #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy docs | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout codebase | |
uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
- name: Build docs | |
run: cd docs && export NODE_OPTIONS=--openssl-legacy-provider && yarn install && yarn run docs:build | |
- name: Install obsutil | |
run: cd docs && wget https://obs-community.obs.cn-north-1.myhuaweicloud.com/obsutil/current/obsutil_linux_amd64.tar.gz && tar -zxvf obsutil_linux_amd64.tar.gz && chmod 755 ./obsutil_linux_amd64_5.5.9/obsutil | |
- name: Config ossutil | |
run: cd docs && ./obsutil_linux_amd64_5.5.9/obsutil config -i ${{ secrets.OBS_ACCESS_KEY_ID }} -k ${{ secrets.OBS_ACCESS_KEY_SECRET }} -e https://obs.cn-north-4.myhuaweicloud.com | |
- name: Upload docs by obsutil | |
run: cd docs && ./obsutil_linux_amd64_5.5.9/obsutil cp ./docs/.vuepress/dist obs://open-read/ego-org/dist -f -r -flat |