From c3d1ce536b7440c32f1e392e1bace01cf75d1438 Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Sun, 11 Oct 2020 12:05:28 +0900 Subject: [PATCH] Publish API docs via GitHub Actions --- .github/workflows/github-pages.yml | 29 +++++++++++++++++++++++++++++ .travis.yml | 13 ------------- 2 files changed, 29 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/github-pages.yml diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml new file mode 100644 index 00000000..3bdeea1d --- /dev/null +++ b/.github/workflows/github-pages.yml @@ -0,0 +1,29 @@ +name: GithHub Pages +on: + push: + tags: + - '*' + +jobs: + github-pages: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP, with composer and extensions + uses: shivammathur/setup-php@v2 + with: + php-version: 7.4 + coverage: none # remove xdebug + + - name: Build API documentation + run: | + curl -LO https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.0.0-rc/phpDocumentor.phar + php phpDocumentor.phar --directory src/ --target docs/api + + - name: Deploy to GithHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/api diff --git a/.travis.yml b/.travis.yml index 77eed441..6e29283c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,16 +36,3 @@ jobs: after_script: - wget https://scrutinizer-ci.com/ocular.phar - php ocular.phar code-coverage:upload --format=php-clover tests/coverage-clover.xml - - - stage: API documentations - if: tag is present - php: 7.4 - before_script: - - curl -LO https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.0.0-rc/phpDocumentor.phar - script: - - php phpDocumentor.phar --directory src/ --target docs/api - deploy: - provider: pages - skip-cleanup: true - local-dir: docs/api - github-token: $GITHUB_TOKEN