Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Deploy Preview

on:
push:
branches:
- 'claude/**'
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}preview/

steps:
- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: main
lfs: true
path: main

- name: Checkout preview branch
uses: actions/checkout@v4
with:
lfs: true
path: preview

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Build main site
working-directory: main
run: |
npm ci
npm run build

- name: Build preview site
working-directory: preview
run: |
npm ci
npm run type-check
npx vite build --base=/RaiderCache/preview/

- name: Combine builds
run: |
mkdir -p combined
cp -r main/dist/* combined/
mkdir -p combined/preview
cp -r preview/dist/* combined/preview/

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./combined

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

- name: Summary
run: |
echo "### Deployed! :rocket:" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Main site:** https://otdavies.github.io/RaiderCache/" >> $GITHUB_STEP_SUMMARY
echo "**Preview:** https://otdavies.github.io/RaiderCache/preview/" >> $GITHUB_STEP_SUMMARY
36 changes: 34 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
- name: Checkout main
uses: actions/checkout@v4
with:
lfs: true
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
Expand All @@ -38,9 +39,40 @@ jobs:
- name: Type check
run: npm run type-check

- name: Build
- name: Build main site
run: npm run build

- name: Check for preview branch
id: preview
run: |
# Find the most recent claude/* branch
PREVIEW_BRANCH=$(git branch -r | grep 'origin/claude/' | head -1 | tr -d ' ')
if [ -n "$PREVIEW_BRANCH" ]; then
echo "branch=${PREVIEW_BRANCH#origin/}" >> $GITHUB_OUTPUT
echo "exists=true" >> $GITHUB_OUTPUT
echo "Found preview branch: $PREVIEW_BRANCH"
else
echo "exists=false" >> $GITHUB_OUTPUT
echo "No preview branch found"
fi

- name: Build preview site
if: steps.preview.outputs.exists == 'true'
run: |
# Save main build
mv dist main-dist

# Checkout and build preview branch
git checkout ${{ steps.preview.outputs.branch }}
npm ci
npx vite build --base=/RaiderCache/preview/

# Combine builds
mv main-dist dist-combined
mkdir -p dist-combined/preview
cp -r dist/* dist-combined/preview/
mv dist-combined dist

- name: Setup Pages
uses: actions/configure-pages@v4

Expand Down
6 changes: 6 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ <h1 class="logo">
<!-- Tab Navigation -->
<div class="sidebar-tabs">
<button class="sidebar-tab" data-tab="hideout">Hideout</button>
<button class="sidebar-tab" data-tab="quest">Quest</button>
<button class="sidebar-tab" data-tab="filters">Filters</button>
<button class="sidebar-tab" data-tab="location">Location</button>
</div>
Expand Down Expand Up @@ -120,6 +121,11 @@ <h1 class="logo">
<div class="sidebar-panel" id="panel-location">
<div id="zone-filter-container"></div>
</div>

<!-- Quest Panel -->
<div class="sidebar-panel" id="panel-quest">
<div class="quest-tracker" id="quest-tracker"></div>
</div>
</div>
</aside>

Expand Down
3 changes: 3 additions & 0 deletions public/data/.map-discovery-cache.json
Git LFS file not shown
4 changes: 2 additions & 2 deletions public/data/items.json
Git LFS file not shown
4 changes: 2 additions & 2 deletions public/data/map-extents.json
Git LFS file not shown
4 changes: 2 additions & 2 deletions public/data/maps.json
Git LFS file not shown
4 changes: 2 additions & 2 deletions public/data/metadata.json
Git LFS file not shown
4 changes: 2 additions & 2 deletions public/data/quests.json
Git LFS file not shown
Loading