From 016423434436c7c9d541e79f35acad39cbe51082 Mon Sep 17 00:00:00 2001 From: codemasher Date: Fri, 19 Nov 2021 13:07:40 +0100 Subject: [PATCH] :octocat: run phpdoc without extra action --- .github/actions/build-docs/Dockerfile | 17 ------------- .github/actions/build-docs/entrypoint.sh | 5 ---- .github/workflows/docs.yml | 30 ---------------------- .github/workflows/tests.yml | 32 +++++++++++++++++++++--- 4 files changed, 28 insertions(+), 56 deletions(-) delete mode 100644 .github/actions/build-docs/Dockerfile delete mode 100644 .github/actions/build-docs/entrypoint.sh delete mode 100644 .github/workflows/docs.yml diff --git a/.github/actions/build-docs/Dockerfile b/.github/actions/build-docs/Dockerfile deleted file mode 100644 index 395c367e6..000000000 --- a/.github/actions/build-docs/Dockerfile +++ /dev/null @@ -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"] diff --git a/.github/actions/build-docs/entrypoint.sh b/.github/actions/build-docs/entrypoint.sh deleted file mode 100644 index 0d7061a04..000000000 --- a/.github/actions/build-docs/entrypoint.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -set -eu - -/opt/phpdoc/bin/phpdoc diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index c917a16a9..000000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 22c6e0de7..5104c5b0d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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