Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
152 changes: 96 additions & 56 deletions .github/workflows/build-the-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@ on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
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: "gh-pages"
group: "pages"
cancel-in-progress: false

jobs:
Expand All @@ -21,59 +27,93 @@ jobs:
needs: build-manuals
if: ${{ !contains(github.event.head_commit.message, '#no-gha') }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Setup Java 8
uses: actions/setup-java@v4
with:
java-version: 8
distribution: "temurin"
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install graphviz texlive-font-utils libcairo2-dev -y
python -m pip install --upgrade pip
pip install -r requirements.txt
wget -O /tmp/plantuml.jar https://github.com/plantuml/plantuml/releases/download/v1.2025.9/plantuml-1.2025.9.jar
- name: Sphynx build index
run: |
sphinx-build -M html docs outputdir/
mv outputdir/html/* outputdir/
chmod -c -R +rX "outputdir/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Download manuals artifacts (html + pdf)
uses: actions/download-artifact@v7
with:
pattern: docs-*
path: outputdir
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: outputdir

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'

- name: Setup Java 8
uses: actions/setup-java@v4
with:
java-version: 8
distribution: "temurin"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
sudo apt-get update && sudo apt-get install graphviz texlive-font-utils -y
wget -O /tmp/plantuml-mit-1.2023.13.jar https://github.com/plantuml/plantuml/releases/download/v1.2023.13/plantuml-mit-1.2023.13.jar

- name: Build docs
run: |
sphinx-build -M html docs outputdir/
sphinx-build -M html v2.1/docs outputdir/2.1/
sphinx-build -b pdf v2.1/docs outputdir/2.1/html/pdf
mv outputdir/html/* outputdir/

- name: Fix permissions
run: |
chmod -c -R +rX "outputdir/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done

- name: Checkout gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages

- name: Copy docs to gh-pages
run: |
mkdir -p gh-pages/2.1/html
rm -rf gh-pages/2.1/html/* || true
cp -r outputdir/2.1/* gh-pages/2.1/html/
build-manuals:
name: build-manuals
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, '#no-gha') }}
strategy:
matrix:
version: [ "2.1", "2.2" ]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Setup Java 8
uses: actions/setup-java@v4
with:
java-version: 8
distribution: "temurin"
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install graphviz texlive-font-utils libcairo2-dev -y
python -m pip install --upgrade pip
pip install -r requirements.txt
wget -O /tmp/plantuml.jar https://github.com/plantuml/plantuml/releases/download/v1.2025.9/plantuml-1.2025.9.jar
- name: Build html v${{ matrix.version }}
run: sphinx-build -M html v${{ matrix.version }}/docs outputdir/${{ matrix.version }}/
- name: Upload html v${{ matrix.version }}
uses: actions/upload-artifact@v4
with:
name: docs-${{ matrix.version }}-html
if-no-files-found: error
path: |
outputdir/${{ matrix.version }}/html
!outputdir/${{ matrix.version }}/html/pdf
- name: Build pdf v${{ matrix.version }}
run: sphinx-build -b pdf v${{ matrix.version }}/docs outputdir/${{ matrix.version }}/html/pdf
- name: Upload pdf ${{ matrix.version }}
uses: actions/upload-artifact@v4
with:
name: docs-${{ matrix.version }}-pdf
if-no-files-found: error
path: outputdir/${{ matrix.version }}/html/pdf/**/*.pdf

- name: Commit and push changes safely
run: |
cd gh-pages
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add 2.1/html
git commit -m "Update 2.1 docs from GitHub Actions" || echo "Nothing to commit"
git pull --rebase origin gh-pages
git push origin gh-pages
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build-index
if: ${{ github.event_name != 'pull_request' && !contains(github.event.head_commit.message, '#no-gha') }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion .github/workflows/grammar-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: VTL grammar tests
on:
workflow_dispatch:
pull_request:
branches: [master]
branches: [develop]
types: [opened, synchronize, reopened]

jobs:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Is pull request based on master branch?
name: Is pull request based on develop branch?
on:
workflow_dispatch:
pull_request:
Expand All @@ -10,7 +10,7 @@ jobs:
steps:
- name: Check base branch
run: |
if [[ "${{ github.event.pull_request.base.ref }}" != "master" ]]; then
echo "Pull requests must target master"
if [[ "${{ github.event.pull_request.base.ref }}" != "develop" ]]; then
echo "Pull requests must target the develop branch"
exit 1
fi
6 changes: 3 additions & 3 deletions .github/workflows/is-fast-forward.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ jobs:
run: git remote add upstream https://github.com/${{ github.repository }}.git

- name: Fetch base branch
run: git fetch upstream master
run: git fetch upstream develop

- name: Check for fast-forward
run: |
git merge-base --is-ancestor upstream/master HEAD || {
echo "PR is not a fast-forward from upstream/master"
git merge-base --is-ancestor upstream/develop HEAD || {
echo "PR is not a fast-forward from upstream/develop"
exit 1
}
6 changes: 3 additions & 3 deletions .github/workflows/recheck-pr-on-push.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Recheck PRs when Master is updated
name: Recheck PRs when develop is updated

on:
push:
branches: [master]
branches: [develop]

jobs:
recheck-open-prs:
Expand All @@ -22,7 +22,7 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
base: 'master'
base: 'develop'
}
);

Expand Down
Loading