Skip to content
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

Build the docs on PRs #128

Merged
merged 3 commits into from Mar 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/pr.yaml
@@ -0,0 +1,44 @@
name: Build

on:
pull_request:
branches:
- main

permissions:
contents: read

env:
SPIN_OPERATOR_RELEASE: v0.1.0

jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.123.0
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb

- name: Install Node.js dependencies
run: npm install

- name: Setup Go environment
uses: actions/setup-go@v5.0.0

- name: Generate CRD reference docs
run: ./generate.sh
working-directory: ./crd-reference
env:
SPIN_OPERATOR_RELEASE: ${{ env.SPIN_OPERATOR_RELEASE }}

- name: Build
run: |
hugo \
--gc \
--minify