Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 25 additions & 11 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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