README: mark Bbato (1.4.1.1) tested #290
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: Bundle and Deploy | |
| on: | |
| push: | |
| branches: | |
| - "*.*/stable" | |
| - "*.*/testing" | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: ${{ github.ref }}-${{ github.workflow }} | |
| cancel-in-progress: true | |
| jobs: | |
| bundle-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Branch | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js Environment | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install Dependencies | |
| run: npm ci | |
| - name: Bundle Extensions | |
| run: npm run bundle | |
| - name: Make GitHub Pages indexable by search engines | |
| run: | | |
| for f in $(find bundles -name 'index.html'); do | |
| # Remove the default noindex directive that blocks search engines | |
| sed -i '/<meta name="robots" content="noindex" \/>/d' "$f" | |
| # Add Google Search Console verification + allow indexing | |
| sed -i 's#<head>#<head>\n <meta name="robots" content="index, follow" />\n <meta name="google-site-verification" content="GehRSH4VThL1APWOewuQMUaZ7RlTT-wDpZviQvRqjKA" />#' "$f" | |
| # Add a link to the GitHub repository in the page header | |
| sed -i 's#</header># <a href="https://github.com/Nicartjay/PaperbackExt" target="_blank" rel="noopener" class="inline-block leading-7 mt-4 mx-1 py-2 px-4 text-white bg-zinc-700 border-b border-zinc-900 rounded-full transition-colors duration-100 hover:bg-zinc-600 hover:cursor-pointer">View on GitHub</a>\n </header>#' "$f" | |
| done | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: bundles | |
| destination_dir: ${{ github.ref_name }} |