Skip to content

Commit 9f0d3d0

Browse files
committed
ci(docs): add docs verify and GitHub Pages workflow
- Add docs.yml: runs docs-verify on pull requests (fork PRs skipped), docs-build on push/merge_group/release only; top-level permissions locked to contents: read; write permissions scoped to job level - Add workflow_call trigger to itf.yml for future reuse
1 parent defaf01 commit 9f0d3d0

2 files changed

Lines changed: 51 additions & 0 deletions

File tree

.github/workflows/docs.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2026 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
13+
name: Verify and Build Docs
14+
15+
permissions:
16+
contents: read
17+
18+
on:
19+
pull_request:
20+
types: [opened, reopened, synchronize]
21+
push:
22+
branches:
23+
- main
24+
merge_group:
25+
types: [checks_requested]
26+
release:
27+
types: [created]
28+
29+
jobs:
30+
docs-verify:
31+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
32+
uses: eclipse-score/cicd-workflows/.github/workflows/docs-verify.yml@c1c90b1a82a1fab0fc202979dde6686b2162d5a8 # v0.0.0
33+
permissions:
34+
pull-requests: write
35+
contents: read
36+
with:
37+
bazel-docs-verify-target: "--lockfile_mode=error //:docs"
38+
39+
docs-build:
40+
needs: [docs-verify]
41+
if: github.event_name != 'pull_request'
42+
uses: eclipse-score/cicd-workflows/.github/workflows/docs.yml@c1c90b1a82a1fab0fc202979dde6686b2162d5a8 # v0.0.0
43+
permissions:
44+
contents: write
45+
pages: write
46+
pull-requests: write
47+
id-token: write
48+
with:
49+
bazel-target: "--lockfile_mode=error //:docs -- --github_user=${{ github.repository_owner }} --github_repo=${{ github.event.repository.name }}"
50+
retention-days: 3

.github/workflows/itf.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# SPDX-License-Identifier: Apache-2.0
1212
# *******************************************************************************
1313
on:
14+
workflow_call:
1415
pull_request:
1516
types: [opened, reopened, synchronize]
1617
merge_group:

0 commit comments

Comments
 (0)