0.3.0 #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish docs | |
on: | |
release: | |
types: [ created ] | |
workflow_dispatch: | |
inputs: | |
version: | |
type: string | |
description: Version number | |
required: true | |
jobs: | |
# Generate docs on GitHub pages | |
docs: | |
name: 'Generate docs' | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout repository | |
- uses: actions/checkout@v3 | |
# Setup Dart SDK | |
- uses: dart-lang/setup-dart@main | |
# Update version number | |
- name: Update version number | |
uses: jacobtomlinson/[email protected] | |
with: | |
find: "VERSIONADDEDBYGITHUB" | |
replace: "${{ github.event.inputs.version || github.ref_name }}" | |
regex: false | |
# Minimal package setup | |
- name: Install dependencies | |
run: dart pub get | |
working-directory: ${{ inputs.working-directory }} | |
# Generate docs | |
- name: Generate docs | |
run: dart doc | |
# Deploy docs to GitHub pages | |
- name: Deploy docs to GitHub pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: doc/api |