Skip to content

chore: Bump to 7.83.x in publication-builder (#2708) #85

chore: Bump to 7.83.x in publication-builder (#2708)

chore: Bump to 7.83.x in publication-builder (#2708) #85

#
# 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 for htmltest
# See: https://github.com/wjdp/htmltest
name: Publication builder
on:
# Reusable workflow. Called on push on the content branches.
workflow_call:
secrets:
CHE_BOT_GITHUB_TOKEN:
required: true
# Run on push on the publication-builder branch.
push:
branches:
- publication-builder
jobs:
build:
name: Publication builder
runs-on: ubuntu-20.04
container: "quay.io/eclipse/che-docs:next"
steps:
- name: Checkout publication-builder branch
uses: actions/checkout@v3
with:
ref: publication-builder
# Cache for Antora UI and Htmltest.
# See: https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows
# Htmltest accepts 2 weeks old cache for the status code of checked external URLs
# See: https://github.com/wjdp/htmltest
# Refresh the cache every week to avoid a stale cache for htmltest
# See: https://github.com/actions/cache
# See: http://man7.org/linux/man-pages/man1/date.1.html
- name: Get Date
id: get-date
run: echo "YEAR_WEEK=$(/bin/date -u +%Y%U)" >> $GITHUB_OUTPUT
shell: bash
- name: Restore cache
uses: actions/cache@v3
env:
cache-name: cache
with:
path: .cache
key: ${{ steps.get-date.outputs.YEAR_WEEK }}
- name: Build for publication
id: antora-build
run: tools/publication-builder.sh
- name: Commit artifact to publication branch
uses: peaceiris/actions-gh-pages@v3
with:
commit_message: "Publication at ${{ steps.get-date.outputs.timestamp }}"
force_orphan: true # publish branch with only the latest commit
github_token: ${{ secrets.CHE_BOT_GITHUB_TOKEN }}
publish_branch: publication
publish_dir: build/site