# Test deploying from Slack
name: Manually triggered Deployment from Slack

on: [deployment]

jobs:
  deployStaging:
    runs-on: ubuntu-latest
    if: github.event.sender.type === 'User' && github.event.deployment.environment === 'staging'
    steps:
      - uses: actions/checkout@v2
      - run: npx now@16 --prod --token $ZEIT_TOKEN
        env:
          ZEIT_TOKEN: ${{ secrets.ZEIT_TOKEN }}
          
      - uses: bobheadxi/deployments@master
        if: always()
        with:
          step: finish
          token: ${{ secrets.GITHUB_TOKEN }}
          status: ${{ job.status }}
          deployment_id: ${{ github.event.deployment.id }}
          env_url: 'https://analysis-staging.conveyal.com'
        
  deployProduction:
    runs-on: ubuntu-latest
    if: github.event.sender.type === 'User' && github.event.deployment.environment === 'production'
    steps:
      - uses: actions/checkout@v2
      - run: echo "deploying to production..."
      # - run: npx now@16 --prod --local-config=now.production.json --token $ZEIT_TOKEN
      #  env:
      #    ZEIT_TOKEN: ${{ secrets.ZEIT_TOKEN }}
      
      - uses: bobheadxi/deployments@master
        if: always()
        with:
          step: finish
          token: ${{ secrets.GITHUB_TOKEN }}
          status: ${{ job.status }}
          deployment_id: ${{ github.event.deployment.id }}
          env_url: 'https://analysis.conveyal.com'

# Test deploying from Slack
name: Manually triggered Deployment from Slack

on: [deployment]

jobs:
  deployStaging:
    runs-on: ubuntu-latest
    if: github.event.sender.type == 'User' && github.event.deployment.environment == 'staging'
    steps:
      - uses: actions/checkout@v2
      - run: npx now@16 --prod --token $ZEIT_TOKEN
        env:
          ZEIT_TOKEN: ${{ secrets.ZEIT_TOKEN }}
          
      - uses: bobheadxi/deployments@master
        if: always()
        with:
          step: finish
          token: ${{ secrets.GITHUB_TOKEN }}
          status: ${{ job.status }}
          deployment_id: ${{ github.event.deployment.id }}
          env_url: 'https://analysis-staging.conveyal.com'
        
  deployProduction:
    runs-on: ubuntu-latest
    if: github.event.sender.type == 'User' && github.event.deployment.environment == 'production'
    steps:
      - uses: actions/checkout@v2
      - run: echo "deploying to production..."
      # - run: npx now@16 --prod --local-config=now.production.json --token $ZEIT_TOKEN
      #  env:
      #    ZEIT_TOKEN: ${{ secrets.ZEIT_TOKEN }}
      
      - uses: bobheadxi/deployments@master
        if: always()
        with:
          step: finish
          token: ${{ secrets.GITHUB_TOKEN }}
          status: ${{ job.status }}
          deployment_id: ${{ github.event.deployment.id }}
          env_url: 'https://analysis.conveyal.com'

Use == instead of ===
Use == instead of ===

#javascript