name: Build and deploy to netlify
on:
  push:
  pull_request:
jobs:
  build:
    runs-on: ubuntu-20.04
    steps:
       - uses: actions/checkout@v2
       - uses: dart-lang/setup-dart@v1

       - 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/master' }}
         run: |
           dart run tool/ci_build.dart
           rm -rf deploy/packages deploy/build.manifest deploy/.dart_tool deploy/.packages
         working-directory: docs
       - name: Deploy to netlify
         uses: nwtgck/actions-netlify@v1.1
         with:
           production-branch: master
           publish-dir: docs/deploy
           enable-pull-request-comment: true
           enable-commit-comment: false
           netlify-config-path: "./netlify.toml"
           alias: deploy-preview-${{ github.event.number }}
           github-token: ${{ secrets.GITHUB_TOKEN }}
         env:
           NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
           NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}

name: Build and deploy to netlify
on:
  push:
  pull_request:
jobs:
  build:
    runs-on: ubuntu-20.04
    steps:
       - uses: actions/checkout@v2
       - uses: dart-lang/setup-dart@v1

       - 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/master' }}
         run: |
           dart run tool/ci_build.dart
           rm -rf deploy/packages deploy/build.manifest deploy/.dart_tool deploy/.packages
         working-directory: docs
       - name: Deploy to netlify
         uses: nwtgck/actions-netlify@v1.1
         with:
           production-branch: master
           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 }}

Remove alias from netlify publish
Remove alias from netlify publish
