mirror of https://github.com/AMT-Cheif/drift.git
67 lines
2.1 KiB
YAML
67 lines
2.1 KiB
YAML
name: Documentation
|
|
on:
|
|
push:
|
|
pull_request:
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: dart-lang/setup-dart@v1.3
|
|
|
|
- name: Get dependencies
|
|
run: dart pub get
|
|
working-directory: docs
|
|
- name: Run build
|
|
env:
|
|
IS_RELEASE: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/latest-release' }}
|
|
run: dart run tool/ci_build.dart
|
|
working-directory: docs
|
|
|
|
- name: Analyze Dart sources
|
|
working-directory: docs
|
|
run: |
|
|
dart analyze --fatal-infos --fatal-warnings
|
|
dart run drift_dev analyze
|
|
|
|
- name: Deploy to netlify (Branch)
|
|
if: ${{ github.event_name == 'push' }}
|
|
uses: nwtgck/actions-netlify@v1.2
|
|
with:
|
|
production-branch: latest-release
|
|
publish-dir: docs/deploy
|
|
enable-pull-request-comment: true
|
|
enable-commit-comment: false
|
|
netlify-config-path: "./netlify.toml"
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
env:
|
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
|
|
|
- name: Check for dead links
|
|
working-directory: docs
|
|
run: dart run tool/ci_check.dart
|
|
|
|
- name: Deploy to netlify (Pull Request)
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
uses: nwtgck/actions-netlify@v1.2
|
|
with:
|
|
production-branch: latest-release
|
|
publish-dir: docs/deploy
|
|
enable-pull-request-comment: true
|
|
enable-commit-comment: false
|
|
netlify-config-path: "./netlify.toml"
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
alias: deploy-preview-${{ github.event.number }}
|
|
env:
|
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
|
|
|
# The documentation on pub is currently broken
|
|
# linkcheck:
|
|
# name: Check links in markdown
|
|
# runs-on: ubuntu-20.04
|
|
# steps:
|
|
# - uses: actions/checkout@master
|
|
# - uses: gaurav-nelson/github-action-markdown-link-check@v1
|