added display for terminalizer #2
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
# A reusable workflow for | ||
# anything that needs to create the | ||
# documentation pages. | ||
# This will accept some input arguments | ||
# and will upload an artifact that contains | ||
# the html directory. | ||
name: "Build doc and upload build/html as tar.gz" | ||
on: | ||
workflow_call: | ||
inputs: | ||
name: | ||
required: true | ||
type: string | ||
targz_name: | ||
required: true | ||
type: string | ||
jobs: | ||
# The actual job of the build-script | ||
build-documentation: | ||
name: Build documentation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: false | ||
- name: Restore cached gif | ||
uses: actions/cache/restore@v3 | ||
id: cache-gif | ||
with: | ||
key: gifs-${{ hashFiles('docs/os/Animations/tmp/hashes.yml') }} | ||
path: | | ||
docs/os/Animations/*/*.gif | ||
docs/os/Animations/tmp/hashes.yml | ||
- name: Node.js setup | ||
if: steps.cache-gif.outputs.cache-hit != 'true' | ||
uses: actions/setup-node@v4 | ||
- name: Run gifs | ||
if: steps.cache-gif.outputs.cache-hit != 'true' | ||
run: | | ||
npm install -g terminalizer | ||
cd docs/os/Animations | ||
export DISPLAY=:1 | ||
bash create.sh | ||
- name: Store cache gif | ||
uses: actions/cache/save@v3 | ||
if: steps.cache-gif.outputs.cache-hit != 'true' | ||
with: | ||
key: gifs-${{ hashFiles('docs/os/Animations/tmp/hashes.yml') }} | ||
path: | | ||
docs/os/Animations/*/*.gif | ||
docs/os/Animations/tmp/hashes.yml | ||
- name: Python installation | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Install requirements | ||
run: | | ||
python -m pip install -r requirements.txt | ||
# upgrade to the latest sphinx | ||
# currently sphinx-book-theme[1.0.1] has a <7 dependency, | ||
# but it works locally and fixes some problems related to | ||
# included documents and jinja replacements | ||
python -m pip install -U "sphinx>=7.2.5" | ||
- name: Build and tar.gz documentation | ||
run: | | ||
make all | ||
# tar gz the build/html dir | ||
tar -czf ${{ inputs.targz_name }} -C build/html . | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ inputs.name }} | ||
path: ${{ inputs.targz_name }} | ||
retention-days: 3 | ||