diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 59674b926..e2741b146 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -6,32 +6,20 @@ on: tags: - "*" workflow_dispatch: + inputs: + tag: + description: 'Tag to release' + pull_request: + +permissions: + contents: write jobs: docs: - name: "Generate Project Documentation" - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.1 - - name: Install Dependencies - uses: nick-invision/retry@v3 - with: - timeout_minutes: 10 - max_attempts: 3 - command: composer config repositories.sami vcs https://${{ secrets.GITHUB_TOKEN }}@github.com/jdpedrie/sami.git && composer require sami/sami:v4.2 && git reset --hard HEAD - - name: Generate Documentation - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - run: .github/actions/docs/entrypoint.sh - - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@releases/v3 - with: - ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} - BRANCH: gh-pages - FOLDER: .docs + name: "Generate and Deploy Documentation" + uses: GoogleCloudPlatform/php-tools/.github/workflows/doctum.yml@main + with: + title: "Google Auth Library PHP Reference Documentation" + default_version: ${{ inputs.tag || github.head_ref || github.ref_name }} + dry_run: ${{ github.event_name == 'pull_request' }} +