diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e16aa16..ad52762 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -5,12 +5,25 @@ on: branches: - main +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +defaults: + run: + shell: bash + jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -22,8 +35,21 @@ jobs: composer install composer run-script phpdoc - - name: Deploy to GH Pages - uses: maxheld83/ghpages@v0.3.0 - env: - BUILD_DIR: 'build/api/' - GH_PAT: ${{ secrets.GH_PAT }} + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./build/api + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest + + needs: build + + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4