Skip to content

Commit 8a04295

Browse files
committed
Removed make target job to previous job + fixed path issues + add PR step
1 parent 418c141 commit 8a04295

File tree

1 file changed

+24
-14
lines changed

1 file changed

+24
-14
lines changed

.github/workflows/dot-org-content.yml

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,33 +32,43 @@ jobs:
3232
echo "No changes in /en"
3333
echo "changed=false" >> $GITHUB_OUTPUT
3434
fi
35-
36-
execute-make:
37-
name: Execute make target 'make hugo-md'
38-
if: needs.detect-changes.outputs.IS_CHANGES_DETECTED
39-
needs: detect-changes
40-
runs-on: ubuntu-latest
41-
steps:
42-
- name: PLACEHOLDER
35+
36+
- name: Execute make target 'make hugo-md' to generate markdown
37+
if: steps.check_changes.outputs.changed == 'true'
4338
run: |
44-
echo "PLACEHOLDER"
39+
cd dot-org-repo
40+
make module-markdown
4541
4642
move-generated-files:
4743
name: Move generated markdown files to '/content/nginx' directory
4844
if: needs.detect-changes.outputs.IS_CHANGES_DETECTED
4945
needs: execute-make
5046
runs-on: ubuntu-latest
5147
steps:
52-
- name: PLACEHOLDER
48+
- name: Move the generated folder
5349
run: |
54-
echo "PLACEHOLDER"
50+
mv dot-org-repo/libxslt-md/ ./content/nginx/
5551
5652
create-PR:
5753
name: Create PR in documentation repository
5854
if: needs.detect-changes.outputs.IS_CHANGES_DETECTED
5955
needs: move-generated-files
6056
runs-on: ubuntu-latest
6157
steps:
62-
- name: PLACEHOLDER
63-
run: |
64-
echo "PLACEHOLDER"
58+
- name: Generate the PR
59+
uses: actions/github-script@v6
60+
with:
61+
script: |
62+
const { repo, owner } = context.repo;
63+
const result = await github.rest.pulls.create({
64+
title: 'NGINX: Update content for content/nginx due to detected changes',
65+
owner,
66+
repo,
67+
head: '${{ github.ref_name }}',
68+
base: 'develop',
69+
body: [
70+
'### Proposed Changes',
71+
'Updated NGINX Plus docs',
72+
].join('\n')
73+
});
74+

0 commit comments

Comments
 (0)