diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 242b972..11005e0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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 diff --git a/.github/workflows/setup-pages.yml b/.github/workflows/setup-pages.yml new file mode 100644 index 0000000..a30a820 --- /dev/null +++ b/.github/workflows/setup-pages.yml @@ -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 '
Your site will be available soon.
' > 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 diff --git a/README.md b/README.md index e2f19c2..764b179 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/index.html b/index.html index feaf27c..6619ea6 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ -