Skip to content

refactor: comprehensive project cleanup and normalization #22

refactor: comprehensive project cleanup and normalization

refactor: comprehensive project cleanup and normalization #22

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [master, main]
paths:
- 'site/**'
- 'docs/**'
- 'README.md'
- 'README.zh-CN.md'
- 'CHANGELOG.md'
- '.github/workflows/pages.yml'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
name: Build Jekyll Site
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: false
- name: Install Dependencies
run: |
cd site
bundle config set path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Build Jekyll Site
run: |
cd site
bundle exec jekyll build \
--destination ../_site \
--baseurl /n-body
env:
JEKYLL_ENV: production
PAGES_REPO_NWO: LessUp/n-body
- name: Verify Build Output
run: |
echo "Verifying build output..."
ls -la ./_site/
if [ ! -f "./_site/index.html" ]; then
echo "❌ ERROR: index.html not found!"
exit 1
fi
echo "✅ index.html exists"
if [ ! -d "./_site/docs" ]; then
echo "⚠️ WARNING: docs directory may be missing"
else
echo "✅ docs directory exists"
fi
if [ ! -d "./_site/assets" ]; then
echo "⚠️ WARNING: assets directory may be missing"
else
echo "✅ assets directory exists"
ls -la ./_site/assets/
fi
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./_site
deploy:
name: Deploy to Pages
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4