Skip to content

Commit

Permalink
Update build_docs actions to newest. Add CI_RUN_DATETIME in version.r…
Browse files Browse the repository at this point in the history
…st. (#829)
  • Loading branch information
tmartin-gh authored Jan 16, 2025
1 parent d71f0dd commit af3573b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
Expand All @@ -38,21 +38,21 @@ concurrency:
jobs:
Authorization:
name: Authorization
runs-on: blossom
runs-on: blossom
outputs:
args: ${{ env.args }}

# This job only runs for pull request merges or manually via the Actions tab
if: |
contains( 'cliffburdick,awthomp,tbensonatl,tylera-nvidia,luitjens,tmartin-gh,', format('{0},', github.actor))
contains( 'cliffburdick,awthomp,tbensonatl,tylera-nvidia,luitjens,tmartin-gh,', format('{0},', github.actor))
steps:
- name: Check if comment is issued by authorized person
run: blossom-ci
env:
OPERATION: 'AUTH'
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO_KEY_DATA: ${{ secrets.BLOSSOM_KEY }}

deploy:
name: Deploy Github Pages
needs: [Authorization]
Expand All @@ -67,20 +67,20 @@ jobs:
password: ${{ secrets.DOCS_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Build Docs
run: |
mkdir build
cd build
cmake .. -DMATX_BUILD_DOCS=ON
make
- name: Setup Pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: 'build/docs_input/sphinx/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4

1 change: 1 addition & 0 deletions docs_input/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ epub_exclude_files = ['search.html']
rst_epilog = f"""
.. |ProjectVersion| replace:: {version}
.. |ProjectRelease| replace:: {release}
.. |CI_RUN_DATETIME| replace:: {datetime.datetime.now()}
"""

ci_env_list = [
Expand Down
1 change: 1 addition & 0 deletions docs_input/version.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ Version Info
GITHUB_REF_NAME: |GITHUB_REF_NAME|
GITHUB_SHA: |GITHUB_SHA|
CI_COMMIT_URL: |CI_COMMIT_URL|
CI_RUN_DATETIME: |CI_RUN_DATETIME|
======================== ========================

0 comments on commit af3573b

Please sign in to comment.