Refactor code to remove unused scratchpad functionality and animation… #14
This file contains hidden or 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: Deploy GitHub Pages with Analytics | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Inject Google Analytics | |
| run: | | |
| GA_SCRIPT="<script async src='https://www.googletagmanager.com/gtag/js?id=${{ secrets.GA_TRACKING_ID }}'></script><script>window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', '${{ secrets.GA_TRACKING_ID }}');</script>" | |
| sed -i "s#</head>#${GA_SCRIPT}</head>#g" index.html | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./ |