Skip to content

add particle blaster game with pixi.js and matter.js #11

add particle blaster game with pixi.js and matter.js

add particle blaster game with pixi.js and matter.js #11

Workflow file for this run

name: Deploy test_web_page to GitHub Pages
on:
push:
branches: [main]
paths:
- "test_web_page/**"
- ".github/workflows/pages.yml"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment, cancel in-progress runs.
concurrency:
group: pages
cancel-in-progress: true
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
working-directory: test_web_page/css-framework-comparison
run: bun install
- name: Build all framework apps
working-directory: test_web_page/css-framework-comparison
run: bun run build:all
- name: Install ysoftman-vue-app dependencies
working-directory: test_web_page/ysoftman-vue-app
run: bun install
- name: Build ysoftman-vue-app
working-directory: test_web_page/ysoftman-vue-app
run: bun run build
- name: Install ysoftman-react-app dependencies
working-directory: test_web_page/ysoftman-react-app
run: bun install
- name: Build ysoftman-react-app
working-directory: test_web_page/ysoftman-react-app
run: bun run build
- name: Install particle dependencies
working-directory: test_web_page/particle
run: bun install
- name: Build particle
working-directory: test_web_page/particle
run: bun run build
- name: Assemble _site
run: |
set -euo pipefail
SRC=test_web_page
OUT=_site
# 1) static landing pages
mkdir -p "$OUT/css-framework-comparison"
cp "$SRC/index.html" "$OUT/index.html"
cp "$SRC/css-framework-comparison/index.html" "$OUT/css-framework-comparison/index.html"
# 2) each framework app that produced a dist
for dir in "$SRC"/css-framework-comparison/*/; do
app=$(basename "$dir")
if [ -d "$dir/dist" ]; then
echo "include built app: $app"
mkdir -p "$OUT/css-framework-comparison/$app"
cp -r "$dir/dist/." "$OUT/css-framework-comparison/$app/"
fi
done
# 2b) ysoftman-vue-app (Vue + Vuetify SPA)
if [ -d "$SRC/ysoftman-vue-app/dist" ]; then
echo "include built app: ysoftman-vue-app"
mkdir -p "$OUT/ysoftman-vue-app"
cp -r "$SRC/ysoftman-vue-app/dist/." "$OUT/ysoftman-vue-app/"
# SPA(history mode) 새로고침/딥링크 대비 404 fallback
cp "$OUT/ysoftman-vue-app/index.html" "$OUT/ysoftman-vue-app/404.html"
fi
# 2c) ysoftman-react-app (CRA, build/ 출력)
if [ -d "$SRC/ysoftman-react-app/build" ]; then
echo "include built app: ysoftman-react-app"
mkdir -p "$OUT/ysoftman-react-app"
cp -r "$SRC/ysoftman-react-app/build/." "$OUT/ysoftman-react-app/"
fi
# 2d) particle (PixiJS + Matter.js 게임)
if [ -d "$SRC/particle/dist" ]; then
echo "include built app: particle"
mkdir -p "$OUT/particle"
cp -r "$SRC/particle/dist/." "$OUT/particle/"
fi
# 3) build info (배포 날짜 / 커밋 버전) — 랜딩 우측 상단에 표시
DATE=$(date -u '+%Y-%m-%d %H:%M UTC')
SHA=$(echo "${GITHUB_SHA:-local}" | cut -c1-7)
printf 'window.__BUILD_INFO__ = { date: "%s", version: "%s" };\n' \
"$DATE" "$SHA" >"$OUT/css-framework-comparison/build-info.js"
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./_site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4