Skip to content

Commit b32577d

Browse files
committed
Add workflow instead of action
1 parent 7e1d173 commit b32577d

File tree

3 files changed

+45
-62
lines changed

3 files changed

+45
-62
lines changed

.github/actions/pulp-docs-ci/action.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/pr.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,9 @@ concurrency:
99

1010
jobs:
1111
docs:
12-
runs-on: "ubuntu-latest"
13-
steps:
14-
- uses: "actions/checkout@v4"
15-
with:
16-
path: "pulp-docs"
17-
fetch-depth: 0
18-
19-
- run: |
20-
echo "$PWD"
21-
ls
22-
23-
- uses: "./pulp-docs/.github/actions/pulp-docs-ci"
24-
with:
25-
repository_name: "pulp-docs"
12+
uses: ./.github/workflows/pulp-docs-ci.yml
13+
with:
14+
repository_name: "pulp-docs"
2615

2716
# tests:
2817
# uses: "./.github/workflows/tests.yml"

.github/workflows/pulp-docs-ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: 'Docs CI'
2+
on:
3+
workflow_call:
4+
inputs:
5+
repository_name:
6+
description: 'The name of the repository CI owner'
7+
required: true
8+
type: string
9+
10+
jobs:
11+
build-docs:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout CI repository
15+
uses: actions/checkout@v4
16+
with:
17+
path: ${{ inputs.repository_name }}
18+
19+
- name: Checkout pulp-docs repository
20+
uses: actions/checkout@v4
21+
if: ${{ inputs.repository_name != 'pulp-docs' }}
22+
with:
23+
repository: "pulp/pulp-docs"
24+
path: pulp-docs
25+
ref: "rewrite-as-mkdocs-plugin"
26+
27+
- uses: actions/setup-python@v5
28+
with:
29+
python-version: "3.12"
30+
31+
- name: "Install pulp-docs"
32+
run: |
33+
cd pulp-docs
34+
pip install --upgrade pip
35+
pip install -r doc_requirements.txt
36+
37+
- name: "Build Docs"
38+
run: |
39+
echo $PWD
40+
cd pulp-docs
41+
pulp-docs fetch --dest /tmp/pulp-docs-tmp
42+
pulp-docs build --path pulp-docs@..:${{ inputs.repository_name }}@..:/tmp/pulp-docs-tmp

0 commit comments

Comments
 (0)