Skip to content

Commit

Permalink
Merge pull request #128 from spinkube/feature/pr-builds
Browse files Browse the repository at this point in the history
Build the docs on PRs
  • Loading branch information
ThorstenHans committed Mar 18, 2024
2 parents 9d9b48c + 9c02fd9 commit 88f045e
Showing 1 changed file with 44 additions and 0 deletions.
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

0 comments on commit 88f045e

Please sign in to comment.