fix: Hide scrolbar #4
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 build | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
push: | |
branches: | |
- main | |
merge_group: | |
types: [checks_requested] | |
jobs: | |
docs-build: | |
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 deployment | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
uses: actions/[email protected] | |
with: | |
name: github-pages | |
path: ${{ github.workspace }}/github-pages.tar | |
retention-days: 1 | |
if-no-files-found: error | |
- name: Upload artifact for pull request link | |
if: github.event_name == 'pull_request' | |
id: upload-artifact-pr | |
uses: actions/[email protected] | |
with: | |
name: github-pages-${{ github.sha }} | |
path: ${{ github.workspace }}/github-pages.tar | |
retention-days: 1 | |
if-no-files-found: error | |
- name: Comment artifact URL | |
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false | |
run: | | |
gh pr comment ${{ github.event.pull_request.number }} \ | |
--body "Documentation artifact: ${{ steps.upload-artifact-pr.outputs.artifact-url }}" | |
env: | |
GH_TOKEN: ${{ github.token }} | |
docs-deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
permissions: | |
pages: write | |
id-token: write | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
needs: docs-build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/[email protected] |