-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c5f0bb
commit 543bd0a
Showing
2 changed files
with
80 additions
and
62 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,25 +4,28 @@ on: | |
push: | ||
branches: | ||
- main | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
- '[0-9]+.[0-9]+.[0-9]+-*' | ||
tags: | ||
- 'v*.*.*' | ||
|
||
env: | ||
GIT_USER_NAME: CHAMEO Developers | ||
GIT_USER_EMAIL: "[email protected]" | ||
|
||
jobs: | ||
|
||
build: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Debug info | ||
run: | | ||
echo "GITHUB_REF_NAME=${GITHUB_REF_NAME}" | ||
echo GITHUB_REF_NAME=${GITHUB_REF_NAME} | ||
- name: Setup Python 3.11 | ||
uses: actions/setup-python@v5 | ||
|
@@ -67,36 +70,13 @@ tl | |
run: | | ||
ontodoc \ | ||
--iri-regex=https://w3id.org/emmo/domain/characterisation-methodology/chameo \ | ||
chameo.ttl \ | ||
public/chameo-inferred.ttl \ | ||
build/chameo.rst | ||
sphinx-build "build/" "public/" | ||
- name: Checkout GitHub Pages for EMMO-repo | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: emmo-repo/emmo-repo.github.io/domain-characterisation-methodology/ | ||
path: pages | ||
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
ssh-strict: no | ||
|
||
- name: Copy to GitHub Pages | ||
run: | | ||
# Do not overwrite index.html | ||
rm public/index.html | ||
# Tell GitHub that this site is not generated with jekyll | ||
touch public/.nojekyll | ||
# Copy to latest (root) | ||
cp -rf public/* pages/. | ||
# Copy to version | ||
VERSION=$(git rev-parse --abbrev-ref HEAD) | ||
if [ ! -d pages/versions/${VERSION} ]; then \ | ||
mkdir pages/versions/${VERSION} | ||
fi | ||
cp -rf public/* pages/versions/${VERSION}/. | ||
- name: Publish | ||
uses: peaceiris/actions-gh-pages@v3 | ||
if: github.ref == 'refs/heads/main' | ||
- name: Publish on GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v4 | ||
#if: github.ref == 'refs/heads/main' | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./public | ||
|
@@ -105,6 +85,29 @@ tl | |
#publish_branch: main | ||
#force_orphan: true | ||
|
||
# - name: Checkout GitHub Pages for EMMO-repo | ||
# uses: actions/checkout@v4 | ||
# with: | ||
# repository: emmo-repo/emmo-repo.github.io/domain-characterisation-methodology/ | ||
# path: pages | ||
# ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
# ssh-strict: no | ||
# | ||
# - name: Copy to GitHub Pages | ||
# run: | | ||
# # Do not overwrite index.html | ||
# rm public/index.html | ||
# # Tell GitHub that this site is not generated with jekyll | ||
# touch public/.nojekyll | ||
# # Copy to latest (root) | ||
# cp -rf public/* pages/. | ||
# # Copy to version | ||
# VERSION=$(git rev-parse --abbrev-ref HEAD) | ||
# if [ ! -d pages/versions/${VERSION} ]; then \ | ||
# mkdir pages/versions/${VERSION} | ||
# fi | ||
# cp -rf public/* pages/versions/${VERSION}/. | ||
|
||
# # Domain repositories can use peaceiris/actions-gh-pages@v3. | ||
# # However, since EMMO for historical reasons uses a separate repo | ||
# # for its GitHub Pages, it is easier to use git directly. | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,48 @@ | ||
name: Generate documentation | ||
on: [push] | ||
|
||
jobs: | ||
|
||
ontodoc: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
max-parallel: 1 | ||
matrix: | ||
python-version: [3.11] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install pandoc | ||
run: | | ||
#sudo apt-get install -y pandoc graphviz texlive-xetex texlive-xetex-extra | ||
sudo apt-get install -y pandoc graphviz | ||
- name: Install EMMOntoPy | ||
run: | | ||
pip install --upgrade pip | ||
pip install EMMOntoPy | ||
- name: Generate documentation | ||
run: | | ||
cd doc | ||
ontodoc --template=chameo.md --format=html ../chameo.ttl chameo.html | ||
# Old documentation - comment out for now... | ||
# | ||
# | ||
# jobs: | ||
# | ||
# ontodoc: | ||
# runs-on: ubuntu-20.04 | ||
# strategy: | ||
# max-parallel: 1 | ||
# matrix: | ||
# python-version: [3.11] | ||
# | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# | ||
# - name: Set up Python ${{ matrix.python-version }} | ||
# uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: ${{ matrix.python-version }} | ||
# | ||
# - name: Install pandoc | ||
# run: | | ||
# #sudo apt-get install -y pandoc graphviz texlive-xetex texlive-xetex-extra | ||
# sudo apt-get install -y pandoc graphviz | ||
# - name: Install EMMOntoPy | ||
# run: | | ||
# pip install --upgrade pip | ||
# pip install EMMOntoPy | ||
# | ||
# - name: Generate documentation | ||
# run: | | ||
# cd doc | ||
# ontodoc --template=chameo.md --format=html ../chameo.ttl chameo.html | ||
# | ||
# - name: Publish | ||
# uses: peaceiris/actions-gh-pages@v4 | ||
# if: github.ref == 'refs/heads/main' | ||
# with: | ||
# github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# publish_dir: ./doc | ||
# #keep_files: true | ||
# #external_repository: emmo-repo.github.io/domain-characterisation-methodology/ | ||
# #publish_branch: main | ||
# #force_orphan: true | ||
# |