Skip to content

Commit 80d0739

Browse files
committed
fix(百度统计): 修复百度统计referrer 被禁用的问题
1 parent 648ead4 commit 80d0739

File tree

3 files changed

+34
-35
lines changed

3 files changed

+34
-35
lines changed

.github/workflows/release.yml

Lines changed: 26 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,39 @@
1-
# https://github.com/actions/create-release
2-
name: release
1+
name: Release
32

43
on:
4+
workflow_dispatch:
55
push:
66
tags:
77
- 'v*'
8-
workflow_dispatch:
9-
10-
# 设置上海时区
11-
env:
12-
TZ: Asia/Shanghai
138

149
jobs:
15-
publish:
10+
release:
1611
runs-on: ubuntu-latest
17-
strategy:
18-
matrix:
19-
node-version: [ latest ]
2012
steps:
21-
- name: Checkout
22-
uses: actions/checkout@v2
23-
- name: Use Node.js 🚀
13+
- uses: actions/checkout@v3
2414
with:
25-
node-version: '16.15.0'
26-
registry-url: https://registry.npmjs.org/
27-
uses: actions/setup-node@v2
28-
- name: Cache yarn modules 🚀
29-
uses: actions/cache@v2
30-
env:
31-
cache-name: cache-yarn-modules
15+
fetch-depth: 0
16+
- name: Set node
17+
uses: actions/setup-node@v3
3218
with:
33-
path: '**/node_modules'
34-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
35-
restore-keys: |
36-
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
37-
- run: yarn install && npm publish --access=public
19+
node-version: 16.x
20+
registry-url: 'https://registry.npmjs.org'
21+
22+
- name: Setup
23+
run: npm i -g @antfu/ni pnpm
24+
25+
- run: npx changelogithub
26+
continue-on-error: true
27+
env:
28+
GITHUB_TOKEN: ${{secrets.GIT_TOKEN}}
29+
30+
- name: Install Dependencies
31+
run: nci
32+
33+
- name: PNPM build
34+
run: nr build
35+
36+
- name: Publish to NPM
37+
run: pnpm -r publish --access public --no-git-checks
3838
env:
3939
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
40-
- name: Prepare the changelog from the tag message
41-
run: |
42-
VERSION=${GITHUB_REF/refs\/tags\//}
43-
echo "Setting release version to $VERSION"
44-
echo "release_version=$VERSION" >> $GITHUB_ENV

.github/workflows/sync.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: sync
2-
on: workflow_dispatch
2+
on:
3+
push:
4+
branches: [ master,dev ]
5+
workflow_dispatch:
36

47
# 设置上海时区
58
env:
@@ -10,8 +13,8 @@ jobs:
1013
if: steps.lerna-cache.outputs.cache-hit != 'true'
1114
runs-on: ubuntu-latest
1215
steps:
13-
# - name: get dashboard size 🚀
14-
# run: size = curl https://api.github.com/repos/dgiot/dgiot-dashboard
16+
# - name: get dashboard size 🚀
17+
# run: size = curl https://api.github.com/repos/dgiot/dgiot-dashboard
1518
- name: Checkout 🚀
1619
uses: actions/checkout@v2
1720
- name: Sync dgiot-dashboard 🚀

public/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
<meta content="<%= VUE_APP_Description %>" name="description" />
1010
<meta content="<%= VUE_APP_AUTHOR %>" name="author" />
1111
<meta content="Colby Fayock" property="og:site_name" />
12-
<meta name="referrer" content="never" />
12+
<!-- <meta name="referrer" content="never" />-->
13+
<meta name="referrer" content="strict-origin-when-cross-origin">
1314
<!-- 引入og -->
1415
<% for(let property in htmlWebpackPlugin.options.ogConfig) { %>
1516
<meta

0 commit comments

Comments
 (0)