Skip to content

Merge pull request #76 from Workiva/FEDX-694 #370

Merge pull request #76 from Workiva/FEDX-694

Merge pull request #76 from Workiva/FEDX-694 #370

name: Deploy Docs
on:
push:
branches:
- 'master'
jobs:
main:
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deploy-docs.outputs.page_url }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sdk: [ 2.19.6 ]
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.sdk }}
- name: Print Dart SDK version
run: dart --version
- id: build-docs
name: Build Docs
run: dart pub get && dart doc .
if: ${{ matrix.sdk == '2.19.6' }}
# Upload the artifact as required by actions/deploy-pages
- name: Archive Dartdoc Artifact
id: archive-dartdoc-artifact
uses: actions/[email protected]
with:
name: dartdoc
path: doc/api/
if: ${{ steps.build-docs.outcome == 'success' }}
- id: deploy-docs
name: Deploy Docs 🚀
uses: actions/deploy-pages@v1
with:
artifact_name: dartdoc
if: ${{ steps.build-docs.outcome == 'success' && steps.archive-dartdoc-artifact.outcome == 'success' && github.event_name == 'push' }}