-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (67 loc) · 2.03 KB
/
Copy pathdocs.yml
File metadata and controls
78 lines (67 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Documentation
on:
push:
branches: [ main ]
paths: [ 'docs/**', 'README.md', '*.md' ]
pull_request:
branches: [ main ]
paths: [ 'docs/**', 'README.md', '*.md' ]
jobs:
deploy-docs:
name: Deploy Documentation
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '18'
- name: Install dependencies
run: |
npm install -g @vuepress/cli vuepress
- name: Generate API Documentation
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- name: Build documentation
run: |
# Create docs structure if it doesn't exist
mkdir -p docs/.vuepress
# Generate basic VuePress config
cat > docs/.vuepress/config.js << 'EOF'
module.exports = {
title: 'TigerZF Documentation',
description: 'Zend Framework 1 reborn for modern PHP applications',
base: '/TigerZF/',
themeConfig: {
nav: [
{ text: 'Home', link: '/' },
{ text: 'Guide', link: '/guide/' },
{ text: 'API Reference', link: '/api/' },
{ text: 'GitHub', link: 'https://github.com/WebTigers/TigerZF' }
],
sidebar: [
'/',
'/guide/',
'/api/',
'/migration/',
'/contributing/'
]
}
}
EOF
# Convert README to docs index
cp README.md docs/README.md
# Build docs
vuepress build docs || echo "Docs build failed, will setup later"
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
if: success()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/.vuepress/dist
cname: tigerzf.webtigers.com