Update versions #614
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
name: Publish documentation | |
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
- name: Install packages | |
run: | | |
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 }} | |
- name: Build documentation | |
run: | | |
cd $GITHUB_WORKSPACE/docs | |
pwd | |
grep -rl '%PHPVERSION' ./ | xargs sed -i 's/%PHPVERSION/8\.3/g' | |
grep -rl '%IMPORTERVERSION' ./ | xargs sed -i 's/%IMPORTERVERSION/1\.5\.7/g' | |
grep -rl '%FFVERSION' ./ | xargs sed -i 's/%FFVERSION/6\.1\.24/g' | |
python -m mkdocs build --clean | |
# also copy security.txt | |
cp -r docs/.well-known site/.well-known | |
- name: Publish to Cloudflare Pages | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: aaf8eef9dd565a13de210d18c7462092 | |
projectName: docs | |
directory: docs/site | |
wranglerVersion: '3' |