Fix docs generation & publish to branch

This commit is contained in:
Matthias Mullie 2022-11-16 13:05:34 +01:00
parent b7df72a9cf
commit 62765c0f9c
5 changed files with 30 additions and 6 deletions

21
.github/workflows/docs.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: docs
on:
push:
branches: [ master ]
tags: [ '*' ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Generate docs
run: make docs
- name: Publish
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: docs
FOLDER: docs
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -4,10 +4,9 @@ DOWN ?= 1
TEST ?=
docs:
wget http://apigen.org/apigen.phar
chmod +x apigen.phar
php apigen.phar generate --source=src --destination=docs --template-theme=bootstrap
rm apigen.phar
docker run --rm -v $$(pwd)/src:/data/src -v $$(pwd)/docs:/data/docs -w /data php:cli bash -c "\
curl -s -L -O https://phpdoc.org/phpDocumentor.phar;\
php phpDocumentor.phar --directory=src --target=docs --visibility=public --defaultpackagename=Minify --title=Minify;"
image:
docker build -t matthiasmullie/minify .
@ -22,3 +21,5 @@ test:
[ $(UP) -eq 1 ] && make up || true
$(eval cmd='docker-compose run php-$(PHP) env XDEBUG_MODE=coverage vendor/bin/phpunit $(TEST)')
eval $(cmd); status=$$?; [ $(DOWN) -eq 1 ] && make down; exit $$status
.PHONY: docs

View File

@ -105,8 +105,8 @@ class CSS extends Minify
/**
* Combine CSS from import statements.
*
* @import's will be loaded and their content merged into the original file,
* to save HTTP requests.
* Import statements will be loaded and their content merged into the original
* file, to save HTTP requests.
*
* @param string $source The file to combine imports for
* @param string $content The CSS content to combine imports for

File diff suppressed because one or more lines are too long

View File

@ -44,6 +44,7 @@ abstract class Minify
* been extracted from the JS source code, so we can reliably match "code",
* without having to worry about potential "code-like" characters inside.
*
* @internal
* @var string[]
*/
public $extracted = array();