Skip to content

Commit ed75ffa

Browse files
committed
Add manual GitHub Pages deployment workflow
- Create workflow for manual deployment to gh-pages branch - Include environment selection (production/staging) - Use official GitHub Pages actions for secure deployment - Add proper permissions and concurrency controls
1 parent b21de9f commit ed75ffa

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
environment:
7+
description: 'Deployment environment'
8+
required: true
9+
default: 'production'
10+
type: choice
11+
options:
12+
- production
13+
- staging
14+
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
19+
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
jobs:
25+
build:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
31+
- name: Setup Pages
32+
uses: actions/configure-pages@v4
33+
34+
- name: Build site
35+
run: |
36+
echo "Building static site..."
37+
# Since this is a static site, we just need to prepare the files
38+
# Remove any development-only files if needed
39+
find . -name ".DS_Store" -delete 2>/dev/null || true
40+
41+
- name: Upload artifact
42+
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: .
45+
46+
deploy:
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
50+
runs-on: ubuntu-latest
51+
needs: build
52+
steps:
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)