Skip to content

Publish documentation #1285

Publish documentation

Publish documentation #1285

Workflow file for this run

name: Publish documentation
on:
push:
branches: [ main ]
workflow_dispatch:
schedule:
- cron: "12 9 * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install packages
run: |
sudo apt update -y
sudo apt install -y pngquant python3-pip python3-setuptools python3-dev python3-venv python3-wheel libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev
sudo rm /usr/bin/python
sudo rm /usr/bin/pip
sudo ln -s /usr/bin/python3 /usr/bin/python
sudo ln -s /usr/bin/pip3 /usr/bin/pip
sudo pip install mkdocs-material mkdocs mkdocs-git-revision-date-plugin mkdocs-redirects mkdocs-minify-plugin pillow cairosvg
env:
MKDOCS_TOKEN: ${{ secrets.MKDOCS_TOKEN }}
- id: ff3version
uses: pozetroninc/github-action-get-latest-release@master
with:
owner: firefly-iii
repo: firefly-iii
excludes: prerelease, draft
token: ${{ secrets.GITHUB_TOKEN }}
- id: importerversion
uses: pozetroninc/github-action-get-latest-release@master
with:
owner: firefly-iii
repo: data-importer
excludes: prerelease, draft
token: ${{ secrets.GITHUB_TOKEN }}
- name: Build documentation
run: |
cd $GITHUB_WORKSPACE/docs
echo "Latest Firefly III release is ${{ steps.ff3version.outputs.release }}"
echo "Latest Data Importer release is ${{ steps.importerversion.outputs.release }}"
grep -rl '%PHPVERSION' ./ | xargs sed -i 's/%PHPVERSION/8\.5/g'
grep -rl '%IMPORTERVERSION' ./ | xargs sed -i 's/%IMPORTERVERSION/${{ steps.importerversion.outputs.release }}/g'
grep -rl '%FFVERSION' ./ | xargs sed -i 's/%FFVERSION/${{ steps.ff3version.outputs.release }}/g'
python -m mkdocs build --clean
# also copy security.txt
cp -r docs/.well-known site/.well-known
- uses: cloudflare/wrangler-action@v4
name: Publish to Cloudflare
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: aaf8eef9dd565a13de210d18c7462092
command: |
pages deploy docs/site --project-name=docs --commit-dirty=true