Skip to content

Commit 6dfc884

Browse files
committed
build: add workflow for deploying home page
1 parent 3434db8 commit 6dfc884

1 file changed

Lines changed: 150 additions & 0 deletions

File tree

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
name: Build and Deploy Homepage
2+
3+
on:
4+
# Allow manual trigger
5+
workflow_dispatch:
6+
# Also run on pushes to main branch
7+
push:
8+
branches: [ main ]
9+
10+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: false
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
env:
25+
GITHUB_PAGES: true
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
30+
- name: Setup Pages
31+
uses: actions/configure-pages@v4
32+
33+
- name: Create homepage directory
34+
run: mkdir -p _site
35+
36+
- name: Generate homepage using iFlow CLI
37+
uses: vibe-ideas/iflow-cli-action@main
38+
with:
39+
prompt: |
40+
Please read only the README.md file content from the current repository (do not read any other files), and convert it into a beautiful slideshow-style documentation website based on Reveal.js and save it as _site/index.html.
41+
42+
Requirements:
43+
44+
1. Use the Reveal.js framework to build a slideshow presentation, splitting the README content into multiple slide pages according to logical structure;
45+
46+
2. Slideshow structure design:
47+
- Homepage slide: Project title, subtitle, GitHub link, and project introduction
48+
- Feature highlights slide: Showcase main features and characteristics
49+
- Installation guide slide: Step-by-step installation process
50+
- Usage examples slide: Display code examples and configuration instructions
51+
- Advanced features slide: Show advanced usage and best practices
52+
- Closing slide: Acknowledgments, contribution guidelines, and contact information;
53+
54+
3. Use modern Reveal.js themes and configurations:
55+
- Enable horizontal and vertical navigation
56+
- Configure slide transition animation effects (such as slide, fade, zoom)
57+
- Add progress bar and slide counter
58+
- Support keyboard navigation and touch gestures
59+
- Enable autoplay functionality (pausable)
60+
- Add slide thumbnail overview;
61+
62+
4. Visual design using surreal digital collage style:
63+
- Use vivid color contrasts and geometric elements
64+
- Create layered visual effects combining text and graphic elements
65+
- Use irregular shapes, transparency, and overlapping effects to create depth
66+
- Employ dynamic backgrounds and animated transitions for visual impact
67+
- Use abstract graphics and digital elements as decorative elements
68+
- Ensure overall design has artistic appeal and visual attraction;
69+
70+
5. Font size and layout optimization (important):
71+
- Title font sizes: Main title 2.5em, subtitle 1.8em, section title 1.5em
72+
- Body text font size: Use 1.2em, ensure clear readability on all devices
73+
- Code font size: Use 0.9em, avoid code blocks being too large causing layout issues
74+
- Line height settings: Body text 1.6x line height, titles 1.4x line height
75+
- Content area margins: Set appropriate padding for each slide (60px top/bottom, 40px left/right)
76+
- Ensure sufficient spacing between text and background, avoid blocking and overlap
77+
- Limit content amount per slide to avoid information overload
78+
- Implement vertical scrolling for long code blocks instead of shrinking font;
79+
80+
6. Code display optimization:
81+
- Use Reveal.js code highlighting plugin
82+
- Support syntax highlighting (YAML, Bash, Markdown, etc.)
83+
- Add line numbers and copy buttons
84+
- Use appropriate maximum height (60vh) and scrollbars for code blocks
85+
- Implement animated display effects for code snippets;
86+
87+
7. Interactive features:
88+
- Add navigation menu and chapter jumping
89+
- Implement fullscreen mode and speaker mode
90+
- Support ESC key to display slide overview
91+
- Add sharing and export functionality;
92+
93+
8. Responsive design:
94+
- Ensure good experience on desktop, tablet, and mobile devices
95+
- Appropriately reduce font size on mobile devices while maintaining readability
96+
- Adapt fonts and layout to different screen sizes
97+
- Optimize interaction experience for touch devices;
98+
99+
9. Technical implementation:
100+
- Import latest version of Reveal.js from CDN
101+
- Configure necessary plugins (highlight.js, notes, zoom, etc.)
102+
- Add custom CSS styles to enhance visual effects
103+
- Ensure fast loading and smooth animation performance;
104+
105+
10. SEO and accessibility:
106+
- Add complete meta tags and structured data
107+
- Ensure keyboard navigation accessibility
108+
- Add alt text and aria labels
109+
- Optimize search engine indexing.
110+
111+
Please directly create a complete HTML file using inline CSS and JavaScript, ensuring the file is self-contained and can run directly in browsers.
112+
113+
Project URL: https://github.com/version-fox/vfox-erlang
114+
api_key: ${{ secrets.IFLOW_API_KEY }}
115+
# settings_json: ${{ secrets.IFLOW_SETTINGS_JSON }}
116+
model: "Qwen3-Coder"
117+
timeout: "1800"
118+
extra_args: "--debug"
119+
120+
- name: Verify reveal.js presentation was generated
121+
run: |
122+
if [ -f "_site/index.html" ]; then
123+
echo "Reveal.js presentation generated successfully!"
124+
echo "Checking for reveal.js content..."
125+
if grep -q "reveal.js" "_site/index.html"; then
126+
echo "✓ Reveal.js framework detected"
127+
else
128+
echo "⚠ Warning: Reveal.js framework not found in generated file"
129+
fi
130+
ls -la _site/
131+
else
132+
echo "Error: Presentation was not generated by iFlow"
133+
exit 1
134+
fi
135+
136+
- name: Upload artifact
137+
uses: actions/upload-pages-artifact@v3
138+
with:
139+
path: ./_site
140+
141+
deploy:
142+
environment:
143+
name: github-pages
144+
url: ${{ steps.deployment.outputs.page_url }}
145+
runs-on: ubuntu-latest
146+
needs: build
147+
steps:
148+
- name: Deploy to GitHub Pages
149+
id: deployment
150+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)