Skip to content

CI

CI #775

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: "43 2 * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: install graphviz
run: sudo apt-get install graphviz
- uses: actions/checkout@v4
- uses: "ramsey/composer-install@v3"
with:
composer-options: "--ansi --prefer-dist"
- name: Download REDAXO
run: curl -sLo redaxo_main.zip https://github.com/redaxo/redaxo/archive/main.zip
- name: Extract REDAXO
run: unzip redaxo_main.zip -d .
- name: phpdoc cache
uses: actions/cache@v4
with:
path: .phpdoc
key: branch-${{ github.ref }}
- name: Cleanup dev files
run: rm -rf redaxo-main/.{github,idea,tools}
- name: Generate phpdoc
run: vendor/bin/phpdoc project:run --target output --directory redaxo-main --ignore "**/tests" --ignore "**/vendor" --force --visibility=public,protected --sourcecode
- name: Deploy to Github Pages
uses: peaceiris/actions-gh-pages@v3
if: success() && github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./output
- name: Trigger page build
if: success() && github.ref == 'refs/heads/main'
run: "curl 'https://api.github.com/repos/FriendsOfREDAXO/phpdoc/pages/builds' -X POST -H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' -H 'Accept: application/vnd.github.mister-fantastic-preview'"