Skip to content

Commit 8d23cc8

Browse files
NAOR YUVALNAOR YUVAL
authored andcommitted
fix: use official GitHub Actions deploy + verify site structure
Made-with: Cursor
1 parent a1e77ed commit 8d23cc8

2 files changed

Lines changed: 25 additions & 6 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Deploy unified MPCP docs to https://mpcp-protocol.github.io/
22
# Site structure: / (landing) | /spec | /reference
3+
#
4+
# Requires: Settings → Pages → Build and deployment → Source: GitHub Actions
35
name: Deploy Docs
46

57
on:
@@ -10,11 +12,18 @@ on:
1012
types: [deploy-docs]
1113

1214
permissions:
13-
contents: write
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
concurrency:
20+
group: pages
21+
cancel-in-progress: false
1422

1523
jobs:
1624
deploy:
1725
runs-on: ubuntu-latest
26+
environment: pages
1827
steps:
1928
- name: Checkout org site
2029
uses: actions/checkout@v4
@@ -57,9 +66,18 @@ jobs:
5766
cp index.html site/
5867
cp -r _site_spec site/spec
5968
cp -r _site_reference site/reference
69+
touch site/.nojekyll
70+
# Verify structure
71+
test -f site/spec/index.html || (echo "Missing site/spec/index.html" && exit 1)
72+
test -f site/reference/index.html || (echo "Missing site/reference/index.html" && exit 1)
73+
echo "Site structure OK:"
74+
find site -name index.html | head -20
6075
61-
- name: Deploy to GitHub Pages
62-
uses: peaceiris/actions-gh-pages@v4
76+
- name: Upload artifact
77+
uses: actions/upload-pages-artifact@v3
6378
with:
64-
github_token: ${{ secrets.GITHUB_TOKEN }}
65-
publish_dir: ./site
79+
path: ./site
80+
81+
- name: Deploy to GitHub Pages
82+
id: deployment
83+
uses: actions/deploy-pages@v4

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ Unified documentation site for the Machine Payment Control Protocol (MPCP).
1313

1414
1. Create the `mpcp-protocol.github.io` repository in the mpcp-protocol organization.
1515
2. Push this content to `main`.
16-
3. GitHub Settings → Pages → Source: **Deploy from a branch** → Branch: **gh-pages**.
16+
3. GitHub Settings → Pages → Source: **GitHub Actions**
17+
4. Run the "Deploy Docs" workflow (runs on push to `main`, or manually).
1718
4. The deploy workflow builds both sites and publishes on push to `main` or via manual trigger.

0 commit comments

Comments
 (0)