Skip to content

Commit

Permalink
fix(百度统计): 修复百度统计referrer 被禁用的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
h7ml committed Jun 14, 2022
1 parent 648ead4 commit 80d0739
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 35 deletions.
57 changes: 26 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,39 @@
# https://github.com/actions/create-release
name: release
name: Release

on:
workflow_dispatch:
push:
tags:
- 'v*'
workflow_dispatch:

# 设置上海时区
env:
TZ: Asia/Shanghai

jobs:
publish:
release:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ latest ]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js 🚀
- uses: actions/checkout@v3
with:
node-version: '16.15.0'
registry-url: https://registry.npmjs.org/
uses: actions/setup-node@v2
- name: Cache yarn modules 🚀
uses: actions/cache@v2
env:
cache-name: cache-yarn-modules
fetch-depth: 0
- name: Set node
uses: actions/setup-node@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
- run: yarn install && npm publish --access=public
node-version: 16.x
registry-url: 'https://registry.npmjs.org'

- name: Setup
run: npm i -g @antfu/ni pnpm

- run: npx changelogithub
continue-on-error: true
env:
GITHUB_TOKEN: ${{secrets.GIT_TOKEN}}

- name: Install Dependencies
run: nci

- name: PNPM build
run: nr build

- name: Publish to NPM
run: pnpm -r publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- name: Prepare the changelog from the tag message
run: |
VERSION=${GITHUB_REF/refs\/tags\//}
echo "Setting release version to $VERSION"
echo "release_version=$VERSION" >> $GITHUB_ENV
9 changes: 6 additions & 3 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: sync
on: workflow_dispatch
on:
push:
branches: [ master,dev ]
workflow_dispatch:

# 设置上海时区
env:
Expand All @@ -10,8 +13,8 @@ jobs:
if: steps.lerna-cache.outputs.cache-hit != 'true'
runs-on: ubuntu-latest
steps:
# - name: get dashboard size 🚀
# run: size = curl https://api.github.com/repos/dgiot/dgiot-dashboard
# - name: get dashboard size 🚀
# run: size = curl https://api.github.com/repos/dgiot/dgiot-dashboard
- name: Checkout 🚀
uses: actions/checkout@v2
- name: Sync dgiot-dashboard 🚀
Expand Down
3 changes: 2 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
<meta content="<%= VUE_APP_Description %>" name="description" />
<meta content="<%= VUE_APP_AUTHOR %>" name="author" />
<meta content="Colby Fayock" property="og:site_name" />
<meta name="referrer" content="never" />
<!-- <meta name="referrer" content="never" />-->
<meta name="referrer" content="strict-origin-when-cross-origin">
<!-- 引入og -->
<% for(let property in htmlWebpackPlugin.options.ogConfig) { %>
<meta
Expand Down

0 comments on commit 80d0739

Please sign in to comment.