diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99d78ed..593371f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,3 +70,44 @@ jobs: echo "### Build Statistics" >> $GITHUB_STEP_SUMMARY echo "Total build size: $(du -sh dist/ | cut -f1)" >> $GITHUB_STEP_SUMMARY echo "JS Chunks: $(ls -l dist/assets/*.js | wc -l)" >> $GITHUB_STEP_SUMMARY + + # Deploy to GitHub Pages + deploy-pages: + name: Deploy to GitHub Pages + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + needs: build-audit + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + contents: read + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + + - name: Install Dependencies + run: npm ci --legacy-peer-deps + + - name: Build Application + run: npm run build + + - name: Configure Pages + uses: actions/configure-pages@v4 + + - name: Upload Pages Artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./dist + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.gitignore b/.gitignore index bad5761..40093c5 100644 --- a/.gitignore +++ b/.gitignore @@ -25,7 +25,6 @@ dist-ssr .agent .specstory/ .vscode/ -.github/ git_workflow_guide.md .claude/ docs/