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 0ea9813
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,15 @@ jobs:
- name: Build docs
run: docs/build.sh
- name: Deploy docs
uses: nwtgck/actions-netlify@v1.2
uses: nwtgck/actions-netlify@v2.0
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 0ea9813

Please sign in to comment.