Skip to content

Commit

Permalink
docs: Google Analytics 4
Browse files Browse the repository at this point in the history
  • Loading branch information
yoursunny committed Jul 13, 2023
1 parent 028b98c commit cb878e9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@ jobs:
run: |
sudo apt-get install -y --no-install-recommends clang-format-11 doxygen
- uses: actions/checkout@v3
- name: Check code style
run: |
mk/format-code.sh
git diff --exit-code
- name: Install dependencies
run: |
sudo apt-get install -y --no-install-recommends clang-format-11 doxygen
- uses: actions/checkout@v3
- name: Check code style
run: |
mk/format-code.sh
Expand All @@ -56,14 +48,15 @@ jobs:
- name: Build docs
run: docs/build.sh
- name: Deploy docs
uses: nwtgck/actions-netlify@v1.2
uses: nwtgck/actions-netlify@30aa80fe8d5eec30813fc8b17b77e0a6663f09b5
with:
publish-dir: ./docs/html/
production-deploy: true
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: ${{ github.sha }} ${{ github.run_id }}
enable-pull-request-comment: false
enable-commit-comment: false
enable-github-deployment: false
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: cd06b281-7d26-4689-a5d1-dcc1b3a1c3e3
Expand Down
1 change: 0 additions & 1 deletion docs/_redirects
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
https://wifiespnow.netlify.app/* https://wifiespnow.yoursunny.dev/:splat 301!
https://wifiespnow.yoursunny.cn/* https://wifiespnow.yoursunny.dev/:splat 301!
2 changes: 1 addition & 1 deletion docs/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ cd "$( dirname "${BASH_SOURCE[0]}" )"

doxygen Doxyfile 2>&1 | ./filter-Doxygen-warning.awk 1>&2

find html -name '*.html' | xargs sed -i '/<\/head>/ i\ <script>(function(e,t,n,i,s,a,c){e[n]=e[n]||function(){(e[n].q=e[n].q||[]).push(arguments)};a=t.createElement(i);c=t.getElementsByTagName(i)[0];a.async=true;a.src=s;c.parentNode.insertBefore(a,c)})(window,document,"galite","script","https://cdn.jsdelivr.net/npm/ga-lite@2/dist/ga-lite.min.js"); if (location.hostname.endsWith(".yoursunny.dev")) { galite("create", "UA-935676-14", "auto"); galite("send", "pageview"); }</script>'
find html -name '*.html' | xargs sed -i '/<\/head>/ i\<script async src="https://www.googletagmanager.com/gtag/js?id=G-YSW3MP43Z4"></script><script>window.dataLayer=[];function gtag(){dataLayer.push(arguments);}if(location.hostname.endsWith(".yoursunny.dev")){gtag("js",new Date());gtag("config","G-MLZ5G2C4X2");}</script></script>'
cp _redirects html/

0 comments on commit cb878e9

Please sign in to comment.