diff --git a/.github/workflows/coverage-nightly.yaml b/.github/workflows/coverage-nightly.yaml
index c025a1a38..dfa896867 100644
--- a/.github/workflows/coverage-nightly.yaml
+++ b/.github/workflows/coverage-nightly.yaml
@@ -6,6 +6,8 @@ on:
- cron: '0 2 * * *'
# Allow manual triggers for testing
workflow_dispatch:
+ # Allow being called from other workflows
+ workflow_call:
concurrency:
group: coverage-${{ github.ref }}
diff --git a/.github/workflows/docs-nightly.yaml b/.github/workflows/docs-nightly.yaml
new file mode 100644
index 000000000..ed2f3d753
--- /dev/null
+++ b/.github/workflows/docs-nightly.yaml
@@ -0,0 +1,100 @@
+name: Documentation (Nightly)
+
+on:
+ schedule:
+ # Run at 4 AM UTC every day
+ - cron: '0 4 * * *'
+ # Allow manual triggers for testing
+ workflow_dispatch:
+ # Allow being called from other workflows
+ workflow_call:
+
+concurrency:
+ group: docs-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ generate-docs:
+ name: Generate Project Documentation
+ runs-on: ubuntu-22.04
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Prepare documentation directory
+ run: |
+ mkdir -p docs-output
+ cp -r doc/* docs-output/
+
+ # Create a simple index.html for the documentation
+ cat > docs-output/index.html <<'EOF'
+
+
+
+ Core Lightning Documentation
+
+
+
+ Core Lightning Documentation
+ Welcome to the Core Lightning documentation site.
+
+
+
Available Documentation
+
This site contains the complete documentation for Core Lightning.
+
+
+
+
+
+
+ EOF
+
+ - name: Upload documentation artifact
+ uses: actions/upload-artifact@v4
+ with:
+ name: project-docs
+ path: docs-output
+ retention-days: 90
+
+ - name: Add summary to job
+ run: |
+ echo "## Project Documentation Generated" >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "📖 Documentation files have been collected and prepared." >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "Download the artifact to view the documentation." >> $GITHUB_STEP_SUMMARY
diff --git a/.github/workflows/publish-site.yaml b/.github/workflows/publish-site.yaml
new file mode 100644
index 000000000..376bb6f5b
--- /dev/null
+++ b/.github/workflows/publish-site.yaml
@@ -0,0 +1,314 @@
+name: Publish Documentation Site
+
+on:
+ schedule:
+ # Run at 5 AM UTC every day, after other workflows
+ - cron: '0 5 * * *'
+ # Allow manual triggers for testing
+ workflow_dispatch:
+
+# Sets permissions for GitHub Pages deployment
+permissions:
+ contents: read
+ pages: write
+ id-token: write
+
+# Allow only one concurrent deployment
+concurrency:
+ group: pages
+ cancel-in-progress: false
+
+jobs:
+ # Generate coverage reports
+ coverage:
+ name: Generate Coverage Reports
+ uses: ./.github/workflows/coverage-nightly.yaml
+
+ # Generate Python API documentation
+ python-docs:
+ name: Generate Python API Documentation
+ uses: ./.github/workflows/python-docs-nightly.yaml
+
+ # Generate general documentation
+ docs:
+ name: Generate Project Documentation
+ uses: ./.github/workflows/docs-nightly.yaml
+
+ # Combine all documentation and deploy to GitHub Pages
+ deploy:
+ name: Deploy to GitHub Pages
+ runs-on: ubuntu-22.04
+ needs: [coverage, python-docs, docs]
+ if: always() # Run even if some jobs fail
+
+ environment:
+ name: github-pages
+ url: ${{ steps.deployment.outputs.page_url }}
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Download coverage artifact
+ uses: actions/download-artifact@v4
+ continue-on-error: true
+ with:
+ name: coverage-html-report
+ path: site-staging/coverage
+
+ - name: Download Python docs artifact
+ uses: actions/download-artifact@v4
+ continue-on-error: true
+ with:
+ name: python-api-docs
+ path: site-staging/python
+
+ - name: Download project docs artifact
+ uses: actions/download-artifact@v4
+ continue-on-error: true
+ with:
+ name: project-docs
+ path: site-staging/docs
+
+ - name: Create site index
+ run: |
+ cat > site-staging/index.html <<'EOF'
+
+
+
+
+
+ Core Lightning Documentation Hub
+
+
+
+
+
+
+
+
+
Welcome to the Core Lightning documentation portal. Choose a category below to explore.
+
+
+
+
+
+
+
+
+
+ EOF
+
+ # Update timestamp
+ TIMESTAMP=$(date -u +"%Y-%m-%d %H:%M UTC")
+ sed -i "s/TIMESTAMP/$TIMESTAMP/" site-staging/index.html
+
+ - name: Add .nojekyll to prevent Jekyll processing
+ run: |
+ touch site-staging/.nojekyll
+
+ - name: Create 404 page
+ run: |
+ cat > site-staging/404.html <<'EOF'
+
+
+
+ 404 - Page Not Found
+
+
+
+
+
+
+ EOF
+
+ - name: Setup Pages
+ uses: actions/configure-pages@v5
+
+ - name: Upload artifact
+ uses: actions/upload-pages-artifact@v3
+ with:
+ path: site-staging
+
+ - name: Deploy to GitHub Pages
+ id: deployment
+ uses: actions/deploy-pages@v4
+
+ - name: Add summary
+ run: |
+ echo "## 🚀 Documentation Site Deployed" >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "The complete documentation site has been deployed to GitHub Pages." >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "### Included Sections:" >> $GITHUB_STEP_SUMMARY
+ echo "- 📖 Project Documentation" >> $GITHUB_STEP_SUMMARY
+ echo "- 🐍 Python API Reference" >> $GITHUB_STEP_SUMMARY
+ echo "- 📊 Code Coverage Reports" >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "🔗 **Site URL:** ${{ steps.deployment.outputs.page_url }}" >> $GITHUB_STEP_SUMMARY
diff --git a/.github/workflows/python-docs-nightly.yaml b/.github/workflows/python-docs-nightly.yaml
index 8cff9ef5b..aecff245b 100644
--- a/.github/workflows/python-docs-nightly.yaml
+++ b/.github/workflows/python-docs-nightly.yaml
@@ -6,6 +6,8 @@ on:
- cron: '0 3 * * *'
# Allow manual triggers for testing
workflow_dispatch:
+ # Allow being called from other workflows
+ workflow_call:
concurrency:
group: python-docs-${{ github.ref }}