📊添加谷歌统计UserID 移除百度统计 #27
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: Publish to OSS | |
on: | |
push: | |
branches: | |
- main # 这里可以根据您的需要更改分支名称 | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
# 安装Node.js | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
# 安装pnpm | |
- name: Install pnpm | |
run: npm install -g pnpm | |
# 执行应用打包步骤 | |
- name: Install dependencies and build | |
run: | | |
echo ${{ secrets.OSS_ACCESSKEY_ID }} | |
echo ${{ secrets.OSS_ACCESSKEY_SECRET }} | |
pnpm install | |
pnpm build | |
# 上传到OSS | |
- name: aliyun-oss-website-action | |
uses: fangbinwei/[email protected] | |
with: | |
# Folder which contains the website files | |
folder: ./dist/ | |
# Aliyun OSS accessKeyId. | |
accessKeyId: ${{ secrets.OSS_ACCESSKEY_ID }} | |
# Aliyun OSS accessKeySecret. | |
accessKeySecret: ${{ secrets.OSS_ACCESSKEY_SECRET }} | |
# Aliyun OSS bucket instance. | |
bucket: bit101-page | |
# OSS region domain | |
endpoint: oss-cn-hongkong.aliyuncs.com | |
# `true` to identify the endpoint is your custom domain. | |
cname: false # optional, default is false | |
# `true` to skip setting static pages related configuration. `indexPage`, `notFoundPage` will not be used. | |
skipSetting: true # optional, default is false | |
# Save info of uploaded files to increase next upload speed | |
incremental: true # optional, default is true | |
# index page | |
indexPage: index.html # optional, default is index.html | |
# not found page | |
notFoundPage: index.html # optional, default is 404.html |