Skip to content

Commit

Permalink
Updated publish actions
Browse files Browse the repository at this point in the history
* Added action on push to develop, and pull_request to develop.
  - Reserved Deploy step only when on master.

* added Makefile check
  • Loading branch information
brtnfld authored Jan 14, 2025
1 parent 6a63203 commit 54fb53c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
push:
branches:
- master
- develop
pull_request:
branches:
- develop
workflow_dispatch:

jobs:
Expand All @@ -27,7 +31,7 @@ jobs:
- name: "Setup python for sphinx"
uses: actions/setup-python@v5
with:
python-version: 3.10
python-version: 3.12.1

- name: "Install python dependencies"
run: |
Expand All @@ -51,6 +55,7 @@ jobs:
continue-on-error: true

- name: "Deploy"
if: github.ref == 'refs/heads/master'
run: |
git clone -b gh-pages --single-branch https://github.com/CGNS/cgns.github.io.git docs/deploy
rsync -q -av --checksum --progress docs/html/ docs/deploy
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ SOURCEDIR = .
BUILDDIR = ./docs/html
CURRENT_DIR = $(shell pwd)

check_python:
@python3 -c 'import sys; assert sys.version_info >= (3, 9), "Python 3.9+ is required"'

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Expand All @@ -18,6 +21,7 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(MAKE) check_python
git submodule init
git submodule update --init --force --remote
if [ ! -d $(BUILDDIR) ]; then mkdir -p $(BUILDDIR); fi
Expand Down

0 comments on commit 54fb53c

Please sign in to comment.