Skip to content

Fix shader loading: Use .txt extensions for GitHub Pages compatibility #8

Fix shader loading: Use .txt extensions for GitHub Pages compatibility

Fix shader loading: Use .txt extensions for GitHub Pages compatibility #8

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [ main ]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
contents: read
pages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: |
NODE_ENV=production npm run build
touch dist/.nojekyll
ls -la dist/
ls -la dist/assets/
cat dist/index.html | grep -E "(script|link)"
- name: Deploy built files to root for GitHub Pages
run: |
# Backup development files
mkdir -p backup-dev
cp index.html backup-dev/
cp -r src backup-dev/ 2>/dev/null || true
# Copy built files to root
cp -r dist/* .
# Commit and push the changes
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Deploy: Update root with built files [skip ci]" || echo "No changes to commit"
git push || echo "Nothing to push"
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./dist
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4