diff --git a/.github/workflows/upy.yml b/.github/workflows/upy.yml new file mode 100644 index 00000000..74102bbe --- /dev/null +++ b/.github/workflows/upy.yml @@ -0,0 +1,29 @@ +name: Deploy to UpYun + +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository master branch + uses: actions/checkout@master + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: 'latest' + extended: true + + - name: Build static files + run: hugo --minify --environment production + + - name: Deploy + uses: her-cat/upyun-deployer@v1.0.3 + with: + bucket: ${{ secrets.UPYUN_BUCKET }} + operator: ${{ secrets.UPYUN_OPERATOR_NAME }} + password: ${{ secrets.UPYUN_OPERATOR_PWD }} + dir: 'public'