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 2 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
46 changes: 46 additions & 0 deletions .github/workflows/pr.yaml
@@ -0,0 +1,46 @@
name: Build only
ThorstenHans marked this conversation as resolved.
Show resolved Hide resolved

on:
pull_request:
branches:
- main

permissions:
contents: read

env:
CANONICAL_DOMAIN: www.spinkube.dev
ThorstenHans marked this conversation as resolved.
Show resolved Hide resolved
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 \
--baseURL "https://${{ env.CANONICAL_DOMAIN }}/"