forked from puppetlabs/puppet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request puppetlabs#9472 from joshcooper/references_ci
(PUP-12055) Build references on commit to main
- Loading branch information
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
name: Generate References | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
generate_references: | ||
if: ${{ github.repository_owner == 'puppetlabs' }} | ||
runs-on: ubuntu-latest | ||
name: Generate References | ||
env: | ||
BUNDLE_WITH: "documentation" | ||
BUNDLE_WITHOUT: "features packaging" | ||
steps: | ||
- name: Checkout current PR | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.2 | ||
bundler-cache: true | ||
|
||
- name: Setup Pandoc | ||
uses: pandoc/actions/setup@d940685d5968400c91029147adbd612deb7696b0 | ||
with: | ||
version: 3.1.8 | ||
|
||
- name: Generate References | ||
id: generate-references | ||
run: | | ||
bundle exec rake references:all | ||
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" | ||
- name: Commit and Push | ||
if: ${{ steps.generate-references.outputs.commit == 'true' }} | ||
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 | ||
with: | ||
author_name: GitHub Actions | ||
author_email: [email protected] | ||
message: 'Update references [no-promote]' | ||
add: 'man references' | ||
push: true | ||
|