You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.6 KiB
Markdown

2 years ago
# upyun-upx-action
通过[又拍云upx](https://github.com/upyun/upx)推送文件到又拍云的云存储
2 years ago
Example usage
```
name: deploy
on:
push:
branches:
- main
pull_request:
branches:
- main
2 years ago
env:
TZ: Asia/Shanghai # 设置当前环境时区
2 years ago
jobs:
deploy:
2 years ago
runs-on: ubuntu-20.04
2 years ago
steps:
2 years ago
- name: Git Configuration
run: |
git config --global core.quotePath false
git config --global core.autocrlf false
git config --global core.safecrlf true
git config --global core.ignorecase false
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Setup Hugo
2 years ago
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
2 years ago
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Build
run:
hugo --minify
- name: deploy-upyun
uses: bwcxyk/upyun-upx-action@1.1
2 years ago
env:
bucket: ${{ secrets.BUCKET }}
operator: ${{ secrets.OPERATOR }}
operator_password: ${{ secrets.OPERATOR_PASSWORD }}
local_path: ./public/
remote_path: /
```
Environment
| Environment | Description |
| ----------------- | ------------ |
| BUCKET | 服务名称 |
| OPERATOR | 操作员 |
| OPERATOR_PASSWORD | 操作员密码 |
| local_path | 本地文件路径 |
| remote_path | 远程文件路径 |