Merge pull request #109 from koupleless/youji-dev #175
This file contains hidden or 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: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout # checkout | |
uses: actions/checkout@v2 | |
- name: Setup hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.124.1' | |
extended: true | |
- name: Build | |
run: npm install postcss-cli && hugo --minify | |
- name: Setup aliyun oss | |
run: wget http://gosspublic.alicdn.com/ossutil/1.7.18/ossutil64 && chmod +x ossutil64 | |
- name: Configure Alibaba Cloud OSSUTIL | |
run: ./ossutil64 config -e oss-cn-hongkong.aliyuncs.com -i ${{ secrets.OSS_ACCESSKEYID }} -k ${{ secrets.OSS_ACCESSKEYSECRET }} | |
- name: Upload the web to the chosen oss bucket | |
run: ./ossutil64 cp -rf ./public/ oss://koupleless-dosc/ |