mirror of
https://github.com/shadoll/vancouver.git
synced 2026-08-28 03:28:21 +00:00
feat: enhance GitHub Pages deployment workflow and update README for setup instructions
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user