Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
24fb26a
feat: implement dynamic DST handling in date selector (#140)
Copilot Aug 8, 2025
f18611c
fix: separate version injection for main and develop builds in deploy…
Copilot Aug 8, 2025
b11cad0
feat: enhance sunrise/sunset visualizations with distinct styling acr…
Copilot Aug 8, 2025
197fdb2
fix: include temporal polyfill source map to resolve 404 error (#161)
Copilot Aug 8, 2025
8b2ed7f
Fix CI test failures caused by inconsistent version injection logic b…
Copilot Aug 9, 2025
67238f3
fix: optimize timezone calculations with caching to resolve performan…
Copilot Aug 9, 2025
2b56145
fix: sunrise/sunset symbol placement and eliminate duplicate visualiz…
Copilot Aug 10, 2025
6ec15c0
feat: implement off-cycle DST timezone selection feature (#168)
Copilot Aug 10, 2025
e195214
Initial plan
Copilot Aug 10, 2025
74bd097
Develop -> copilot/fix-167 (#173)
tsmarvin Aug 10, 2025
172131f
Fix DST timezone selection issues - add "+" buttons to search results…
Copilot Aug 10, 2025
88c5e14
refactor: replace legacy Date methods with Temporal API for DST/timez…
Copilot Aug 10, 2025
4a3b6c3
fix: simplify version number insertion into site (#165)
Copilot Aug 10, 2025
ab8d79b
refactor: simplify Date creation patterns and eliminate redundant Tem…
Copilot Aug 10, 2025
42a0a9f
refactor: replace legacy Date usage with proper Temporal API implemen…
Copilot Aug 10, 2025
982a750
fix: correct Temporal API usage for DST calculations using proper tim…
Copilot Aug 10, 2025
4adb0db
fix: eliminate Date object creation with timezone-specific millisecon…
Copilot Aug 10, 2025
da920c3
Merge pull request #172 from tsmarvin/copilot/fix-167
tsmarvin Oct 12, 2025
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
21 changes: 20 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for gitversion

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v4
with:
versionSpec: '6.x.x'

- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand All @@ -31,6 +42,14 @@ jobs:

- name: Build project
run: npm run build
env:
GITVERSION_SEMVER: ${{ steps.gitversion.outputs.semVer }}
GITVERSION_FULLSEMVER: ${{ steps.gitversion.outputs.fullSemVer }}
GITVERSION_INFORMATIONALVERSION: ${{ steps.gitversion.outputs.informationalVersion }}

- name: Run tests (includes linting, formatting, and type checking)
run: npm test
run: npm test
env:
GITVERSION_SEMVER: ${{ steps.gitversion.outputs.semVer }}
GITVERSION_FULLSEMVER: ${{ steps.gitversion.outputs.fullSemVer }}
GITVERSION_INFORMATIONALVERSION: ${{ steps.gitversion.outputs.informationalVersion }}
120 changes: 93 additions & 27 deletions .github/workflows/deploy-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,41 +82,107 @@ jobs:
- name: Install dependencies
run: npm ci

# First: Build main branch content for the root
- name: Checkout and build main branch
# First: Build develop branch content for the subdirectory
- name: Build develop branch for sub-directory
run: npm run build
env:
GITVERSION_SEMVER: ${{ steps.gitversion.outputs.semVer }}
GITVERSION_FULLSEMVER: ${{ steps.gitversion.outputs.fullSemVer }}
GITVERSION_INFORMATIONALVERSION: ${{ steps.gitversion.outputs.informationalVersion }}

# Save develop build
- name: Save develop build
run: mv dist develop-dist

# Second: Build main branch content for the root
- name: Checkout and build main branch with test site link
run: |
# Save current state
git stash push -m "Save develop changes"
# Save current develop state
git stash push -m "Save develop changes" || echo "No changes to stash"

# Checkout main branch
# Checkout main branch with full history and ensure tags are available
git checkout main
git pull origin main || echo "No changes to pull"

# Build main branch content
# Ensure all tags are fetched for version calculation
git fetch --tags || echo "Tags already available"

# Build main branch content with proper main branch GitVersion
npm run build

# Save main build
mv dist main-dist

# Return to develop branch
# Return to develop branch and restore state
git checkout develop
# Only pop the stash if one exists, and fail if pop fails
if git stash list | grep -q .; then
if git stash list | grep -q "Save develop changes"; then
git stash pop
else
echo "No stash to pop"
fi
env:
GITVERSION_SEMVER: ${{ steps.gitversion.outputs.semVer }}
GITVERSION_FULLSEMVER: ${{ steps.gitversion.outputs.fullSemVer }}
GITVERSION_INFORMATIONALVERSION: ${{ steps.gitversion.outputs.informationalVersion }}
# Pass test site info for footer link
TEST_SITE_PATH: ${{ steps.pr-info.outputs.deploy_path }}

# Second: Build develop branch content for the subdirectory
- name: Build develop branch for sub-directory
run: npm run build
# Get GitVersion for main branch after checking it out
- name: Get main branch GitVersion
id: gitversion-main
run: |
# Save current develop state
git stash push -m "Save develop changes" || echo "No changes to stash"

# Checkout main branch
git checkout main
git pull origin main || echo "No changes to pull"
git fetch --tags || echo "Tags already available"

# Get GitVersion for main branch
gitversion /output json | tee gitversion-main.json
MAIN_SEMVER=$(cat gitversion-main.json | grep -o '"SemVer":"[^"]*"' | cut -d'"' -f4)
MAIN_FULLSEMVER=$(cat gitversion-main.json | grep -o '"FullSemVer":"[^"]*"' | cut -d'"' -f4)
MAIN_INFORMATIONAL=$(cat gitversion-main.json | grep -o '"InformationalVersion":"[^"]*"' | cut -d'"' -f4)

echo "main_semver=$MAIN_SEMVER" >> $GITHUB_OUTPUT
echo "main_fullsemver=$MAIN_FULLSEMVER" >> $GITHUB_OUTPUT
echo "main_informational=$MAIN_INFORMATIONAL" >> $GITHUB_OUTPUT

echo "::notice::Main branch GitVersion - SemVer: $MAIN_SEMVER"
echo "::notice::Main branch GitVersion - FullSemVer: $MAIN_FULLSEMVER"

# Return to develop branch and restore state
git checkout develop
if git stash list | grep -q "Save develop changes"; then
git stash pop
fi

# Rebuild main with proper GitVersion values
- name: Rebuild main branch with correct GitVersion
run: |
# Save current develop state
git stash push -m "Save develop changes" || echo "No changes to stash"

# Checkout main branch
git checkout main
git pull origin main || echo "No changes to pull"
git fetch --tags || echo "Tags already available"

# Build main branch content with proper main branch GitVersion
npm run build

# Save main build
rm -rf main-dist
mv dist main-dist

# Return to develop branch and restore state
git checkout develop
if git stash list | grep -q "Save develop changes"; then
git stash pop
fi
env:
GITVERSION_SEMVER: ${{ steps.gitversion.outputs.semVer }}
GITVERSION_FULLSEMVER: ${{ steps.gitversion.outputs.fullSemVer }}
GITVERSION_INFORMATIONALVERSION: ${{ steps.gitversion.outputs.informationalVersion }}
# Use proper GitVersion values for main branch
GITVERSION_SEMVER: ${{ steps.gitversion-main.outputs.main_semver }}
GITVERSION_FULLSEMVER: ${{ steps.gitversion-main.outputs.main_fullsemver }}
GITVERSION_INFORMATIONALVERSION: ${{ steps.gitversion-main.outputs.main_informational }}
# Pass test site info for footer link
TEST_SITE_PATH: ${{ steps.pr-info.outputs.deploy_path }}

# Third: Combine both builds into a single directory structure
- name: Combine builds for deployment
Expand All @@ -131,21 +197,21 @@ jobs:
mkdir -p "combined-dist/$DEPLOY_PATH"

# Modify develop build for sub-directory deployment
if [ -f dist/index.html ]; then
if [ -f develop-dist/index.html ]; then
# Add base tag for sub-directory if not present
if ! grep -q "<base" dist/index.html; then
sed -E '0,/<head[[:space:]]*>/s|<head[[:space:]]*>|<head>\n <base href="/'$DEPLOY_PATH'/">|' dist/index.html > "combined-dist/$DEPLOY_PATH/index.html"
if ! grep -q "<base" develop-dist/index.html; then
sed -E '0,/<head[[:space:]]*>/s|<head[[:space:]]*>|<head>\n <base href="/'$DEPLOY_PATH'/">|' develop-dist/index.html > "combined-dist/$DEPLOY_PATH/index.html"
echo "::notice::Added base tag to index.html for sub-directory support"
else
cp dist/index.html "combined-dist/$DEPLOY_PATH/"
cp develop-dist/index.html "combined-dist/$DEPLOY_PATH/"
echo "::notice::Base tag already exists in index.html"
fi

# Copy other files, preserving directory structure
rsync -av --exclude=index.html dist/ "combined-dist/$DEPLOY_PATH/"
rsync -av --exclude=index.html develop-dist/ "combined-dist/$DEPLOY_PATH/"
else
echo "::warning::dist/index.html not found, copying all files as-is"
cp -r dist/* "combined-dist/$DEPLOY_PATH/"
echo "::warning::develop-dist/index.html not found, copying all files as-is"
cp -r develop-dist/* "combined-dist/$DEPLOY_PATH/"
fi

# Replace dist with combined structure
Expand Down
Loading
Loading