:octocat: run phpdoc without extra action

This commit is contained in:
codemasher
2021-11-19 13:07:40 +01:00
parent c79042f271
commit 0164234344
4 changed files with 28 additions and 56 deletions
-17
View File
@@ -1,17 +0,0 @@
# https://hub.docker.com/r/phpdoc/phpdoc
FROM phpdoc/phpdoc:3.0
LABEL "repository"="https://github.com/chillerlan/php-qrcode"
LABEL "com.github.actions.name"="Build Docs"
LABEL "com.github.actions.description"="Build Docs with phpDocumentor"
LABEL "com.github.actions.icon"="file-text"
LABEL "com.github.actions.color"="blue"
# don't show errors
RUN echo "display_errors = Off" > $PHP_INI_DIR/conf.d/errors.ini
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
-5
View File
@@ -1,5 +0,0 @@
#!/bin/sh
set -eu
/opt/phpdoc/bin/phpdoc
-30
View File
@@ -1,30 +0,0 @@
# from https://github.com/PHPMailer/PHPMailer
on:
push:
branches:
- main
name: "Docs"
jobs:
build_and_publish:
name: "Build and publish Docs"
runs-on: ubuntu-latest
steps:
- name: "Checkout sources"
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: "Build Docs"
uses: ./.github/actions/build-docs
- name: "Publish Docs to gh-pages"
uses: JamesIves/github-pages-deploy-action@4.1.5
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: .
CLEAN: true
+28 -4
View File
@@ -36,6 +36,34 @@ jobs:
- name: "Run phan"
run: php vendor/bin/phan
build-docs:
name: "Build and publish Docs"
runs-on: ubuntu-latest
steps:
- name: "Checkout sources"
uses: actions/checkout@v2
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
coverage: none
tools: phpDocumentor:3
extensions: ast, gd, imagick, json, mbstring
- name: "Build Docs"
run: phpdoc --config=phpdoc.xml`
- name: "Publish Docs to gh-pages"
uses: JamesIves/github-pages-deploy-action@4.1.5
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: docs
CLEAN: true
tests:
name: "Unit Tests"
@@ -53,10 +81,6 @@ jobs:
- "8.1"
steps:
# - name: "Configure git to avoid issues with line endings"
# if: matrix.os == 'windows-latest'
# run: git config --global core.autocrlf false
- name: "Checkout"
uses: actions/checkout@v2