Some checks failed
Deploy to GitHub Pages / build-and-deploy (push) Has been cancelled
35 lines
750 B
YAML
35 lines
750 B
YAML
name: Deploy to GitHub Pages
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '16'
|
|
|
|
- name: Install dependencies (if any)
|
|
run: npm ci || echo "No package.json or install failed, continuing..."
|
|
|
|
- name: Verify size constraint
|
|
run: |
|
|
chmod +x ./check-size.sh
|
|
./check-size.sh
|
|
|
|
- name: Deploy to GitHub Pages
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./
|
|
publish_branch: gh-pages |