feat: enhance GitHub Pages deployment workflow and update README for setup instructions

This commit is contained in:
sha
2025-06-20 14:02:50 +03:00
parent d1fa63d3c1
commit 036633548b
4 changed files with 56 additions and 2 deletions
+4
View File
@@ -37,9 +37,13 @@ jobs:
env:
NODE_ENV: production
- name: List build output
run: ls -la dist/
- name: Setup Pages
uses: actions/configure-pages@v4
if: github.ref == 'refs/heads/main'
continue-on-error: true
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
+32
View File
@@ -0,0 +1,32 @@
name: Setup GitHub Pages
on:
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Setup Pages
uses: actions/configure-pages@v4
with:
enablement: true
- name: Create placeholder index.html
run: |
mkdir -p dist
echo '<h1>GitHub Pages Setup Complete</h1><p>Your site will be available soon.</p>' > dist/index.html
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
+19 -1
View File
@@ -58,7 +58,7 @@ make install
# Start development server
make dev
# Build for production
# Build for production
make build
```
@@ -105,6 +105,24 @@ The application supports light and dark themes with:
## 🚀 Deployment
### GitHub Pages Setup
Before the automatic deployment works, you need to configure GitHub Pages in your repository:
1. **Enable GitHub Pages:**
- Go to your repository on GitHub
- Navigate to Settings → Pages
- Under "Source", select "GitHub Actions"
2. **Run initial setup (optional):**
- Go to Actions tab in your repository
- Run the "Setup GitHub Pages" workflow manually
- This will initialize the Pages environment
3. **Automatic deployment:**
- After setup, every push to `main` branch will automatically build and deploy
- The site will be available at `https://[username].github.io/vancouver/`
### GitHub Pages (Automatic)
Push to the `main` branch to trigger automatic deployment to GitHub Pages via GitHub Actions.
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Svelte</title>
<title>Vancouver</title>
</head>
<body>
<div id="app"></div>