Skip to content

Commit f49ec0e

Browse files
committed
test
1 parent 5af02da commit f49ec0e

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/docs.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
name: Generate Docs
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
9+
#permissions:
10+
# contents: write
11+
12+
jobs:
13+
generate_docs:
14+
#if: ${{ github.repository_owner == 'puppetlabs' }}
15+
runs-on: ubuntu-latest
16+
name: Generate Docs
17+
env:
18+
BUNDLE_WITH: "documentation"
19+
BUNDLE_WITHOUT: "features packaging"
20+
steps:
21+
- name: Checkout current PR
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Ruby
25+
uses: ruby/setup-ruby@v1
26+
with:
27+
ruby-version: 3.1
28+
bundler-cache: true
29+
30+
- name: Install pandoc
31+
run: |
32+
sudo apt update
33+
sudo apt install -y pandoc groff
34+
35+
- name: Generate references
36+
id: generate-references
37+
run: |
38+
bundle exec rake references:all
39+
git --no-pager diff --exit-code --ignore-matching-lines='This page was generated from the Puppet source' --ignore-matching-lines='built_from_commit:' man references || echo 'commit=true' >> "$GITHUB_OUTPUT"
40+
41+
- name: Commit and Push
42+
if: ${{ steps.generate-references.outputs.commit == 'true' }}
43+
uses: EndBug/add-and-commit@v9
44+
with:
45+
author_name: GitHub Actions
46+
author_email: actions@github.com
47+
message: 'Update references'
48+
add: 'man references'
49+
push: false
50+

0 commit comments

Comments
 (0)