diff --git a/.github/workflows/generate-docs.yml b/.github/workflows/generate-docs.yml index f18c342..f55147c 100644 --- a/.github/workflows/generate-docs.yml +++ b/.github/workflows/generate-docs.yml @@ -1,12 +1,21 @@ -name: Generate documentation +name: Generate and publish documentation on: release: types: [ released ] workflow_dispatch: +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + jobs: - build: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -17,8 +26,12 @@ jobs: distribution: 'temurin' - name: Generate API documentation run: ./gradlew dokkaHtml - - name: Deploy API documentation to Github Pages - uses: JamesIves/github-pages-deploy-action@v4 + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 with: - branch: gh-pages - folder: parsely/build/dokka/html + path: 'parsely/build/dokka/html' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4