Skip to content

CI: Add github action to build documentation repo #151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/hugo-build-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Hugo Build Test
name: Latest Hugo Version Build Test

on:
pull_request:
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/nginx-documentation-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build Hugo Docs with PR Theme

on:
pull_request:
branches:
- main

jobs:
build-docs:
name: Build Hugo Docs with PR Theme
runs-on: ubuntu-latest

steps:
- name: Checkout hugo theme
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.7.1
with:
fetch-depth: 0 # This is required for hugo Lastmod to function properly

- name: Clone documentation repo
run: |
git clone https://github.com/nginx/documentation.git docs

- name: Setup Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: ">=1.23"

- name: Setup Hugo
uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f # v3.0.0
with:
hugo-version: "0.134.2"
extended: true

- name: Build Hugo site
working-directory: docs
run: |
hugo --gc -e production --baseURL="https://frontdoor-test-docs.nginx.com/nginx-hugo-theme/${{github.event.pull_request.number}}"
Loading