Skip to content

ci fixed

ci fixed #42

name: Deploy on GitHub Pages
on:
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: 'pages'
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Read Bun version
run: echo "BUN_VERSION=$(cat .bun-version)" >> $GITHUB_ENV
- uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ env.BUN_VERSION }}
- name: Install Dependencies (retry)
run: |
for i in 1 2 3; do
echo "Attempt $i: bun install --frozen-lockfile"
if bun install --frozen-lockfile; then
exit 0
fi
if [ "$i" -lt 3 ]; then
echo "Install failed, retrying in 10s..."
sleep 10
fi
done
echo "bun install failed after 3 attempts"
exit 1
- name: Build Vite site
run: |
bun run build-only
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: dist
deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4