@@ -10,7 +10,7 @@ permissions:
1010 contents : read
1111 pages : write
1212 id-token : write
13-
13+
1414concurrency :
1515 group : ' pages'
1616 cancel-in-progress : false
@@ -20,11 +20,33 @@ jobs:
2020 name : Build Documentation
2121 runs-on : ubuntu-latest
2222 steps :
23- - name : Checkout Code
23+ # 1. Checkout the documentation repository
24+ - name : Checkout Documentation
2425 uses : actions/checkout@v4
2526 with :
2627 fetch-depth : 0
2728
29+ # 2. Checkout the TypePHP core repository into ./typephp
30+ - name : Checkout TypePHP Core
31+ uses : actions/checkout@v4
32+ with :
33+ repository : typephp-php/typephp
34+ path : typephp
35+
36+ # 3. Setup PHP to install core dependencies
37+ - name : Setup PHP
38+ uses : shivammathur/setup-php@v2
39+ with :
40+ php-version : ' 8.3'
41+ tools : composer:v2
42+
43+ # 4. Install nikic/php-parser and phpstan/phpdoc-parser for bundling
44+ - name : Install TypePHP Dependencies
45+ run : |
46+ cd typephp
47+ composer install --no-dev --prefer-dist --no-progress --no-interaction
48+
49+ # 5. Setup Node.js for VitePress
2850 - name : Setup Node.js
2951 uses : actions/setup-node@v4
3052 with :
@@ -34,10 +56,13 @@ jobs:
3456 - name : Setup GitHub Pages
3557 uses : actions/configure-pages@v4
3658
37- - name : Install Dependencies
59+ - name : Install Node Dependencies
3860 run : npm ci
3961
62+ # 6. Build docs with TYPEPHP_PATH pointing to the cloned core repo
4063 - name : Build with VitePress
64+ env :
65+ TYPEPHP_PATH : ${{ github.workspace }}/typephp
4166 run : npm run docs:build
4267
4368 - name : Upload Artifact
0 commit comments