initial version of logging feature request #369
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ******************************************************************************* | |
# Copyright (c) 2024 Contributors to the Eclipse Foundation | |
# | |
# See the NOTICE file(s) distributed with this work for additional | |
# information regarding copyright ownership. | |
# | |
# This program and the accompanying materials are made available under the | |
# terms of the Apache License Version 2.0 which is available at | |
# https://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# SPDX-License-Identifier: Apache-2.0 | |
# ******************************************************************************* | |
name: Documentation | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
push: | |
merge_group: | |
types: [checks_requested] | |
jobs: | |
docs-build: | |
name: Build documentation | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Setup Bazel | |
uses: bazel-contrib/[email protected] | |
- name: Build documentation | |
run: | | |
bazel build //docs:github-pages && cp bazel-bin/docs/github-pages.tar . | |
- name: Upload artifact for job analysis | |
uses: actions/[email protected] | |
with: | |
name: github-pages-${{ github.sha }} | |
path: github-pages.tar | |
retention-days: 1 | |
if-no-files-found: error | |
docs-deploy: | |
name: Deploy documentation to GitHub Pages | |
permissions: | |
pages: write | |
id-token: write | |
contents: write | |
concurrency: | |
group: gh-pages | |
cancel-in-progress: false | |
runs-on: ubuntu-latest | |
needs: docs-build | |
steps: | |
# Checkout is required to get the local actions. | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Download documentation artifact | |
uses: actions/[email protected] | |
with: | |
name: github-pages-${{ github.sha }} | |
- name: Untar documentation artifact | |
run: mkdir -p extracted_docs && tar -xf github-pages.tar -C extracted_docs | |
- name: Deploy 🚀 | |
id: pages-deployment | |
continue-on-error: true | |
uses: ./.github/actions/deploy-versioned-pages | |
with: | |
source_folder: extracted_docs | |
- name: Deploy (fallback) 🚀 | |
id: deployment | |
# If the new deployment from gh-pages branch fails, at least deploy the current version. | |
# This is only a short-term solution, until we can change the repository settings. | |
if: ${{ steps.pages-deployment.outcome == 'failure' && github.event_name == 'push' && github.ref_name == 'main' }} | |
uses: actions/[email protected] | |
with: | |
artifact_name: github-pages-${{ github.sha }} |