44 push :
55 branches : [ main ]
66 paths :
7- - ' web/landing/**'
8- - ' api-docs/**'
7+ - ' web/project-site/**'
98 - ' .github/workflows/project-website.yml'
109 workflow_dispatch :
1110
3029 with :
3130 node-version : 20
3231 cache : ' npm'
33- cache-dependency-path : web/landing /package-lock.json
32+ cache-dependency-path : web/project-site /package-lock.json
3433
3534 - name : Setup Go
3635 uses : actions/setup-go@v5
@@ -41,34 +40,39 @@ jobs:
4140 run : go install github.com/swaggo/swag/cmd/swag@latest
4241
4342 - name : Generate API documentation
44- run : swag init -g cmd/server/main.go -o api-docs
43+ run : swag init -g cmd/server/main.go -o web/project-site/public/ api --outputTypes json --dir cmd,internal
4544
4645 - name : Install dependencies
47- working-directory : web/landing
46+ working-directory : web/project-site
4847 run : npm ci
4948
50- - name : Build landing site
51- working-directory : web/landing
49+ - name : Build project site
50+ working-directory : web/project-site
5251 run : npm run build
5352
53+ - name : Prepare for deployment
54+ run : |
55+ echo "Copying CNAME..."
56+ cp CNAME web/project-site/dist/CNAME
57+ echo "Creating 404.html for SPA routing..."
58+ cp web/project-site/dist/index.html web/project-site/dist/404.html
59+
5460 - name : Verify build
5561 run : |
5662 echo "Build verification:"
57- ls -la docs/
58- echo "Checking docs structure:"
59- ls -la docs/docs/ || echo "No docs subdirectory found"
63+ ls -la web/project-site/dist/
6064 echo "Verifying key files:"
61- test -f docs /index.html && echo "✓ index.html" || echo "✗ index.html missing"
62- test -f docs/api .html && echo "✓ api .html" || echo "✗ api .html missing"
63- test -f docs/docs/intro.html && echo "✓ docs/intro.html " || echo "✗ docs/intro.html missing"
65+ test -f web/project-site/dist /index.html && echo "✓ index.html" || echo "✗ index.html missing"
66+ test -f web/project-site/dist/404 .html && echo "✓ 404 .html" || echo "✗ 404 .html missing"
67+ test -f web/project-site/dist/CNAME && echo "✓ CNAME " || echo "✗ CNAME missing"
6468
6569 - name : Setup GitHub Pages
6670 uses : actions/configure-pages@v4
6771
6872 - name : Upload to GitHub Pages
6973 uses : actions/upload-pages-artifact@v3
7074 with :
71- path : docs
75+ path : web/project-site/dist
7276
7377 - name : Deploy to GitHub Pages
7478 id : deployment
0 commit comments