diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 80147309..d06f8cda 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -7,31 +7,45 @@ on: workflow_dispatch: jobs: - generate-and-deploy-docs: + build: + name: Build runs-on: ubuntu-latest steps: - # Checkout the repository - - name: Checkout repository + - name: Get files uses: actions/checkout@v4 - # Install Flutter - uses: subosito/flutter-action@v2 with: channel: stable cache: true - # Install dependencies - name: Install dependencies run: flutter pub get - # Generate documentation - name: Generate documentation run: dart doc . - # Deploy to GitHub Pages - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v4 + - name: Upload pages artifacts + id: deployment + uses: actions/upload-pages-artifact@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./doc/api \ No newline at end of file + path: ./doc/api + + deploy: + name: 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@v4