Skip to content

Commit 9e0e69a

Browse files
authored
ci(docs): fix gh-pages deploy auth in reusable docs workflow (agntcy#1725)
## Summary - fixes docs deploy on main where fails to push gh-pages - keeps credential persistence disabled - adds an ephemeral setup for deploy modes only, using ## Why After PR agntcy#1720, Documentation Deploy fails in and root-file publish is skipped, so GitHub Pages is not updated. ## Security - no credentials persisted in checkout config - token is consumed only during deploy jobs via environment and askpass --------- Signed-off-by: Luca Muscariello <muscariello@ieee.org>
1 parent 94a3736 commit 9e0e69a

6 files changed

Lines changed: 22 additions & 6 deletions

File tree

.github/workflows/buf-ci.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ on:
1515
- "**/LICENSE"
1616
pull_request:
1717
types: [opened, synchronize, reopened, labeled, unlabeled]
18+
paths:
19+
# Keep PR trigger aligned with push trigger to avoid running on docs-only changes.
20+
- "**.proto"
21+
- "**/buf.yaml"
22+
- "**/buf.lock"
23+
- "**/buf.md"
24+
- "**/README.md"
25+
- "**/LICENSE"
26+
- ".github/workflows/buf-ci.yaml"
1827
delete:
1928
permissions:
2029
contents: read

.github/workflows/codeql.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ on:
99
branches: [ "main" ]
1010
pull_request:
1111
branches: [ "main" ]
12+
paths-ignore:
13+
- 'docs/**'
14+
- '.github/workflows/docs-ci.yaml'
15+
- '.github/workflows/docs-deploy.yml'
16+
- '.github/workflows/reusable-docs.yml'
1217
schedule:
1318
- cron: '42 5 * * 6'
1419
workflow_dispatch:

.github/workflows/coverage.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
---
5-
name: ci-publish-prokect-coverage
5+
name: ci-publish-project-coverage
66

77
on:
88
push:
99
branches: [main]
1010
pull_request:
1111
branches: [main]
12+
paths-ignore:
13+
- 'docs/**'
14+
- '.github/workflows/docs-ci.yaml'
15+
- '.github/workflows/docs-deploy.yml'
16+
- '.github/workflows/reusable-docs.yml'
1217

1318
jobs:
1419
coverage:

.github/workflows/docs-ci.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ on:
99
pull_request:
1010
paths:
1111
- 'docs/**'
12-
- '.github/workflows/docs-ci.yaml'
13-
- '.github/workflows/reusable-docs.yml'
1412

1513
permissions:
1614
contents: read

.github/workflows/docs-deploy.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ on:
1616
branches: [main]
1717
paths:
1818
- 'docs/**'
19-
- '.github/workflows/docs-deploy.yml'
20-
- '.github/workflows/reusable-docs.yml'
2119
tags:
2220
- 'v*.*.*'
2321
release:

.github/workflows/reusable-docs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ jobs:
3838
with:
3939
# mike needs full history and the gh-pages branch to deploy versions.
4040
fetch-depth: 0
41-
persist-credentials: false
41+
# Keep checkout credentials for mike --push in deploy modes.
42+
persist-credentials: true
4243

4344
- name: Setup uv
4445
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2

0 commit comments

Comments
 (0)