Skip to content

docs: update

docs: update #7

Workflow file for this run

name: Generate Markdown Docs
on:
push:
branches:
- '*'
workflow_dispatch:
permissions:
contents: write
jobs:
generate:
if: github.actor != 'github-actions[bot]'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, intl
coverage: none
tools: composer:v2
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- name: Generate Markdown documentation
run: |
vendor/bin/phpdoc \
--directory=src \
--target=docs \
--template="vendor/saggre/phpdocumentor-markdown/themes/markdown" \
--title="PHP SDK for Lingo.dev" \
--visibility=public
- name: Commit and push updates
run: |
STATUS=$(git status --short docs)
if [ -z "$STATUS" ]; then
echo "Documentation already up to date"
exit 0
fi
echo "Docs updated, committing changes"
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add docs
git commit -m "docs: update markdown API reference [skip ci]"
git push