Skip to content

Bump actions/cache from 4.2.3 to 5.0.1 #2066

Bump actions/cache from 4.2.3 to 5.0.1

Bump actions/cache from 4.2.3 to 5.0.1 #2066

Workflow file for this run

---
#
# Copyright (c) 2020 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# GitHub Actions configuration file to
# 1. Build the project with Antora
# 2. Prepare the preview publication
# 3. Validate the internal and external links
name: Preview build
on:
- pull_request
jobs:
preview-build:
name: Preview build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0 # enable git diff and building many branches
- name: Set up Ruby (for Asciidoctor CLI)
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: false
- name: Install Asciidoctor + Rouge
run: gem install --no-document asciidoctor rouge
- name: Install Python deps
run: |
python -m pip install -U pip
pip install mkdocs mkdocs-material mkdocs-callouts mkdocs-asciidoctor-backend
- name: Build MkDocs site
run: |
python -m mkdocs build -f mkdocs.yml
- name: Get yearweek for cache
id: get-date # used below
run: echo "yearweek=$(/bin/date -u "+%Y%U")" >> $GITHUB_OUTPUT
shell: bash
- name: Restore cache
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v4.0.3
env:
cache-name: cache
with:
path: .cache
key: ${{ steps.get-date.outputs.yearweek }}
- name: Store pull request details for preview-publish
run: |
echo "${{ github.event.number }}" > PR_NUMBER
echo "${{ github.event.pull_request.head.sha }}" > PR_SHA
- name: Upload preview-build artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: preview-build
path: |
public
PR_NUMBER
PR_SHA
retention-days: 7
- uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v4.0.3
with:
path: tmp/.htmltest
key: ${{ runner.os }}-htmltest
- name: Validate internal and external links
run: |
curl https://htmltest.wjdp.uk | bash
bin/htmltest