From f8c8e9391a914f1e0b8e4544d5f53fb848cbc306 Mon Sep 17 00:00:00 2001 From: codemasher Date: Mon, 6 Apr 2020 16:40:47 +0200 Subject: [PATCH] :sparkles: phpdoc? --- .github/actions/build-docs/Dockerfile | 15 +++++++++++++ .github/actions/build-docs/entrypoint.sh | 5 +++++ .github/workflows/docs.yml | 28 ++++++++++++++++++++++++ docs/Readme.md | 0 4 files changed, 48 insertions(+) create mode 100644 .github/actions/build-docs/Dockerfile create mode 100644 .github/actions/build-docs/entrypoint.sh create mode 100644 .github/workflows/docs.yml create mode 100644 docs/Readme.md diff --git a/.github/actions/build-docs/Dockerfile b/.github/actions/build-docs/Dockerfile new file mode 100644 index 000000000..92d2ef976 --- /dev/null +++ b/.github/actions/build-docs/Dockerfile @@ -0,0 +1,15 @@ +FROM phpdoc/phpdoc + +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 + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/.github/actions/build-docs/entrypoint.sh b/.github/actions/build-docs/entrypoint.sh new file mode 100644 index 000000000..0d7061a04 --- /dev/null +++ b/.github/actions/build-docs/entrypoint.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +set -eu + +/opt/phpdoc/bin/phpdoc diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000..033fc659a --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,28 @@ +# from https://github.com/PHPMailer/PHPMailer + +on: + push: + branches: + - master + +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: maxheld83/ghpages@v0.3.0 + env: + BUILD_DIR: docs/ + GH_PAT: ${{ secrets.GH_PAT }} diff --git a/docs/Readme.md b/docs/Readme.md new file mode 100644 index 000000000..e69de29bb