diff --git a/.github/workflows/update_docs.yml b/.github/workflows/update_docs.yml index e588168c..d57f043f 100644 --- a/.github/workflows/update_docs.yml +++ b/.github/workflows/update_docs.yml @@ -9,22 +9,16 @@ on: - 'src/**/*.php' jobs: - docs-update: + build: runs-on: ubuntu-latest permissions: pages: write id-token: write - - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Use PHP 8.2 uses: shivammathur/setup-php@v2 with: @@ -37,12 +31,24 @@ jobs: - name: Generate run: composer run apigen - + - name: Upload GitHub Pages artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v3 with: - path: 'docs' + path: docs + + deploy: + runs-on: ubuntu-latest + needs: build + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v2 + uses: actions/deploy-pages@v4