Skip to content

Bump actions/deploy-pages from 4.0.2 to 4.0.3 #260

Bump actions/deploy-pages from 4.0.2 to 4.0.3

Bump actions/deploy-pages from 4.0.2 to 4.0.3 #260

Workflow file for this run

# Copyright 2023 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
---
name: Build
'on':
workflow_call:
pull_request:
branches:
- main
jobs:
build-hugo:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.111.3
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup NodeJS environment
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version-file: 'antora/package.json'
cache: 'npm'
cache-dependency-path: 'antora/package-lock.json'
- name: Setup Go environment
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: website/go.mod
cache: true
cache-dependency-path: website/go.sum
- 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 Dart Sass Embedded
run: sudo snap install dart-sass-embedded
- name: Build documentation
run: npm --prefix antora ci && npm --prefix antora run build
- name: Build with Hugo
env:
HUGO_ENVIRONMENT: ${{ github.event_name == 'pull_request' && 'development' || 'production'}}
HUGO_ENV: ${{ github.event_name == 'pull_request' && 'development' || 'production'}}
run: |
hugo \
--source website \
--gc \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
path: public
name: website
pull-request-data:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Create pull request data
run: |
mkdir pull_request
echo ${{ github.event.pull_request.number }} > ./pull_request/number
- name: Upload pull request data
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
path: .
name: pull-request-data