Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions .github/workflows/build-prs-to-main.yml

This file was deleted.

23 changes: 20 additions & 3 deletions .github/workflows/deploy-page.yml → .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: Build and deploy to GitHub Pages
name: Build and Deploy

on:
workflow_dispatch:
pull_request:
push:
branches:
- main

permissions:
contents: write

jobs:
github-pages:
build-and-deploy:
runs-on: ubuntu-22.04
environment:
name: github-pages
Expand All @@ -33,8 +37,21 @@ jobs:
- name: Build site
run: npm run build

- name: Check build output
run: |
if [ ! -d "_site" ]; then
echo "Error: _site directory not found"
exit 1
fi
if [ ! -f "_site/index.html" ]; then
echo "Error: index.html not found in _site"
exit 1
fi
echo "✅ Build validation successful"

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site
Expand Down