|
| 1 | +# Copyright (c) 2026 The STE||AR Group |
| 2 | +# |
| 3 | +# SPDX-License-Identifier: BSL-1.0 |
| 4 | +# Distributed under the Boost Software License, Version 1.0. (See accompanying |
| 5 | +# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 6 | + |
| 7 | +name: Documentation Deploy |
| 8 | + |
| 9 | +on: |
| 10 | + workflow_run: |
| 11 | + workflows: ["Documentation Build"] |
| 12 | + types: |
| 13 | + - completed |
| 14 | + branches: |
| 15 | + - master |
| 16 | + - 'release**' |
| 17 | + workflow_dispatch: |
| 18 | + |
| 19 | +concurrency: |
| 20 | + group: docs-deploy-${{ github.ref }} |
| 21 | + cancel-in-progress: false |
| 22 | + |
| 23 | +jobs: |
| 24 | + deploy-documentation: |
| 25 | + runs-on: ubuntu-latest |
| 26 | + container: stellargroup/build_env:17 |
| 27 | + if: > |
| 28 | + (github.event.workflow_run.conclusion == 'success' && |
| 29 | + github.event.workflow_run.head_repository.full_name == github.repository) || |
| 30 | + github.event_name == 'workflow_dispatch' |
| 31 | + permissions: |
| 32 | + actions: read |
| 33 | + |
| 34 | + steps: |
| 35 | + - uses: actions/checkout@v6 |
| 36 | + |
| 37 | + - name: Download Documentation Artifacts |
| 38 | + uses: dawidd6/action-download-artifact@v19 |
| 39 | + with: |
| 40 | + workflow: documentation-build.yml |
| 41 | + commit: ${{ github.event.workflow_run.head_sha }} |
| 42 | + name: documentation-artifacts |
| 43 | + path: /__w/hpx/hpx/build/share/hpx/docs |
| 44 | + |
| 45 | + - name: Download Depreport Artifacts |
| 46 | + uses: dawidd6/action-download-artifact@v19 |
| 47 | + with: |
| 48 | + workflow: depreport.yml |
| 49 | + commit: ${{ github.event.workflow_run.head_sha }} |
| 50 | + name: hpx-depreport |
| 51 | + path: /__w/hpx/hpx/build/share/hpx/docs/report |
| 52 | + |
| 53 | + - name: Add GitHub to known hosts |
| 54 | + shell: bash |
| 55 | + run: | |
| 56 | + mkdir -p /root/.ssh |
| 57 | + chmod 700 /root/.ssh |
| 58 | + ssh-keyscan -H github.com >> /root/.ssh/known_hosts |
| 59 | +
|
| 60 | + - name: Setup SSH deploy key |
| 61 | + shell: bash |
| 62 | + run: | |
| 63 | + eval "$(ssh-agent -s)" |
| 64 | + echo "${{ secrets.DOCS_DEPLOY_KEY }}" | ssh-add - |
| 65 | + echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >> $GITHUB_ENV |
| 66 | + echo "SSH_AGENT_PID=$SSH_AGENT_PID" >> $GITHUB_ENV |
| 67 | +
|
| 68 | + - name: Configure Local Git |
| 69 | + shell: bash |
| 70 | + run: | |
| 71 | + git config --global user.name "TheHPXBot" |
| 72 | + git config --global user.email "hpxdude42@protonmail.com" |
| 73 | + git config --global --add safe.directory /__w/hpx/hpx |
| 74 | + git config --global --add safe.directory /__w/hpx/hpx/build/docs/gh-pages |
| 75 | +
|
| 76 | + - name: Push Documentation |
| 77 | + shell: bash |
| 78 | + run: | |
| 79 | + mkdir -p /__w/hpx/hpx/build/docs |
| 80 | + cd /__w/hpx/hpx/build/docs |
| 81 | + cmake \ |
| 82 | + -DHPX_BINARY_DIR=/__w/hpx/hpx/build \ |
| 83 | + -DHPX_WITH_GIT_BRANCH=master \ |
| 84 | + -DHPX_WITH_DOCUMENTATION_OUTPUT_FORMATS="html singlehtml latexpdf" \ |
| 85 | + "-DGIT_REPOSITORY=git@github.com:STEllAR-GROUP/hpx-docs.git;--branch;HPXBot-test" \ |
| 86 | + -P /__w/hpx/hpx/cmake/HPX_UpdateGitDocs.cmake |
| 87 | +
|
| 88 | + - name: Cleanup SSH agent |
| 89 | + if: always() |
| 90 | + shell: bash |
| 91 | + run: ssh-agent -k |
0 commit comments