|
1 | 1 | # Deploy unified MPCP docs to https://mpcp-protocol.github.io/ |
2 | 2 | # Site structure: / (landing) | /spec | /reference |
3 | 3 | # |
4 | | -# Requires: Settings → Pages → Build and deployment → Source: GitHub Actions |
| 4 | +# CRITICAL: Settings → Pages → Source: Deploy from a branch |
| 5 | +# Branch: gh-pages | Folder: / (root) |
| 6 | +# If you use "main", only the landing page will load (404 on /spec, /reference) |
5 | 7 | name: Deploy Docs |
6 | 8 |
|
7 | 9 | on: |
|
12 | 14 | types: [deploy-docs] |
13 | 15 |
|
14 | 16 | permissions: |
15 | | - contents: read |
16 | | - pages: write |
17 | | - id-token: write |
18 | | - |
19 | | -concurrency: |
20 | | - group: pages |
21 | | - cancel-in-progress: false |
| 17 | + contents: write |
22 | 18 |
|
23 | 19 | jobs: |
24 | 20 | deploy: |
25 | 21 | runs-on: ubuntu-latest |
26 | | - environment: pages |
27 | 22 | steps: |
28 | 23 | - name: Checkout org site |
29 | 24 | uses: actions/checkout@v4 |
@@ -67,17 +62,13 @@ jobs: |
67 | 62 | cp -r _site_spec site/spec |
68 | 63 | cp -r _site_reference site/reference |
69 | 64 | touch site/.nojekyll |
70 | | - # Verify structure |
71 | 65 | test -f site/spec/index.html || (echo "Missing site/spec/index.html" && exit 1) |
72 | 66 | test -f site/reference/index.html || (echo "Missing site/reference/index.html" && exit 1) |
73 | | - echo "Site structure OK:" |
| 67 | + echo "Site structure OK" |
74 | 68 | find site -name index.html | head -20 |
75 | 69 |
|
76 | | - - name: Upload artifact |
77 | | - uses: actions/upload-pages-artifact@v3 |
| 70 | + - name: Deploy to GitHub Pages (gh-pages branch) |
| 71 | + uses: peaceiris/actions-gh-pages@v4 |
78 | 72 | with: |
79 | | - path: ./site |
80 | | - |
81 | | - - name: Deploy to GitHub Pages |
82 | | - id: deployment |
83 | | - uses: actions/deploy-pages@v4 |
| 73 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 74 | + publish_dir: ./site |
0 commit comments