Skip to content

Deploy static content to Pages #8

Deploy static content to Pages

Deploy static content to Pages #8

name: Deploy static content to Pages
on:
push:
# Run when a change to these files is pushed to master.
branches: ['master', 'release-clm5.0']
paths:
- 'doc/**'
- '!doc/*ChangeLog*'
- '!doc/*ChangeSum*'
- '!doc/UpdateChangelog.pl'
# Include all include::ed files outside doc/ directory!
- 'src/README.unit_testing'
- 'tools/README'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build-and-deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# Get all history, ensuring all branches are available for checkout
fetch-depth: 0
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Build docs using container
id: build-docs
run: |
bin/git-fleximod update -o
cd doc
./build_docs_to_publish -d --site-root https://escomp.github.io/CTSM
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload publish dir
path: 'doc/_publish'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4