From 0d7c3e2f49341f6621c803f3a0a75b935df34ae0 Mon Sep 17 00:00:00 2001 From: Andrew Gioia Date: Thu, 11 Dec 2025 15:57:34 -0500 Subject: [PATCH] Reconfigures GH actions workflows for PR URL handling --- .../workflows/{pages.yml => docs-master.yml} | 0 .github/workflows/{pr.yml => docs-pr.yml} | 53 ++++++------------- docs/icons.html | 2 +- docs/index.html | 2 +- 4 files changed, 19 insertions(+), 38 deletions(-) rename .github/workflows/{pages.yml => docs-master.yml} (100%) rename .github/workflows/{pr.yml => docs-pr.yml} (59%) diff --git a/.github/workflows/pages.yml b/.github/workflows/docs-master.yml similarity index 100% rename from .github/workflows/pages.yml rename to .github/workflows/docs-master.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/docs-pr.yml similarity index 59% rename from .github/workflows/pr.yml rename to .github/workflows/docs-pr.yml index 67eef91..85a5942 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/docs-pr.yml @@ -7,22 +7,20 @@ on: - master permissions: - contents: read - pages: write - id-token: write - pull-requests: write + contents: write # push to gh-pages + pull-requests: write # create/update PR comment concurrency: group: docs-preview-${{ github.event.pull_request.number }} cancel-in-progress: true jobs: - build: - name: Build docs + build-and-deploy-preview: + name: Build & deploy PR preview runs-on: ubuntu-latest steps: - - name: Checkout repository + - name: Checkout PR branch uses: actions/checkout@v4 - name: Setup Node @@ -34,41 +32,24 @@ jobs: - name: Install dependencies run: npm ci - - name: Build docs (npm run publish) + - name: Build docs run: npm run publish - - name: Upload artifact for GitHub Pages - uses: actions/upload-pages-artifact@v3 + - name: Deploy preview to gh-pages/pr-/ + uses: peaceiris/actions-gh-pages@v4 with: - path: ./docs - - deploy: - name: Deploy PR preview - needs: build - runs-on: ubuntu-latest - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - - outputs: - page_url: ${{ steps.deployment.outputs.page_url }} - - steps: - - name: Deploy to GitHub Pages (preview) - id: deployment - uses: actions/deploy-pages@v4 - with: - # mark this as a preview deployment for a PR - preview: true + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_branch: gh-pages + publish_dir: ./docs + destination_dir: pr-${{ github.event.pull_request.number }} + keep_files: true comment: name: Comment preview URL on PR - needs: deploy + needs: build-and-deploy-preview runs-on: ubuntu-latest - # only run if we actually got a URL, and only for same-repo PRs (forks have restricted tokens) - if: > - needs.deploy.outputs.page_url != '' && - github.event.pull_request.head.repo.full_name == github.repository + # only for same-repo PRs (no forks) + if: github.event.pull_request.head.repo.full_name == github.repository steps: - name: Find existing docs preview comment @@ -87,7 +68,7 @@ jobs: body: | 🔍 **Keyrune docs preview** - Preview URL: ${{ needs.deploy.outputs.page_url }} + Preview URL: https://keyrune.andrewgioia.com/pr-${{ github.event.pull_request.number }}/ - Source branch: `${{ github.head_ref }}` - Target branch: `${{ github.base_ref }}` diff --git a/docs/icons.html b/docs/icons.html index 46ea1e6..5cd1c6f 100644 --- a/docs/icons.html +++ b/docs/icons.html @@ -45,7 +45,7 @@

- View the full list of set and expansion symbols below, for all sets and special edition products up to Avatar: the Last Airbender. To use the symbols on your desktop or just get the vectors, check out the Cheatsheet. + View the full list of set and expansion symbols below, for all sets and special edition products up to Lorwyn Eclipsed and TMNT. To use the symbols on your desktop or just get the vectors, check out the Cheatsheet.

Note: you can now link directly to a preview of each symbol's by adding the symbol code at the end of the url like this: https://keyrune.andrewgioia.com/icons.html?icon=ody. diff --git a/docs/index.html b/docs/index.html index 71a4292..be10d60 100644 --- a/docs/index.html +++ b/docs/index.html @@ -43,7 +43,7 @@

- Current version 3.17.1 includes all sets to Avatar: The Last Airbender. + Current version 3.18.0 includes all sets to Lorwyn Eclipsed.