Skip to content

Commit

Permalink
docs: add 'exclude'
Browse files Browse the repository at this point in the history
  • Loading branch information
fangbinwei committed Aug 30, 2020
1 parent e23054e commit c571968
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ deploy website on aliyun OSS(Alibaba Cloud OSS)
- `htmlCacheControl`: 默认`no-cache`
- `imageCacheControl`: 默认`max-age=864000`
- `otherCacheControl`: 默认`max-age=2592000`
- `exclude`: 不上传`folder`下的某些文件/文件夹

## Cache-Control
为上传的资源默认设置的`Cache-Control`如下
Expand All @@ -51,6 +52,33 @@ deploy website on aliyun OSS(Alibaba Cloud OSS)

若不需要action来设置, 可以配置`skipSetting`为`true`

## exclude
如果`folder`下的某些文件不需要上传


```yml
- name: exclude some files
uses: fangbinwei/aliyun-oss-website-action@v1
with:
folder: dist
exclude: |
tmp.txt
tmp/
tmp2/*.txt
tmp2/*/*.txt
# match dist/tmp.txt
# match dist/tmp/
# match dist/tmp2/a.txt
# match dist/tmp2/a/b.txt not match dist/tmp2/tmp3/b.txt
```
> 不支持`**`

或者
```yml
- name: Clean files before upload
run: rm -f dist/tmp.txt
```

## Demo
### 部署VuePress项目

Expand Down

0 comments on commit c571968

Please sign in to comment.