# This is a basic workflow to help you get started with Actions

name: Build website

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  build:
    # The type of runner that the job will run on
    runs-on: windows-latest
    
    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
    - name: Setup dotnet
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: | 
          2.1.x
          3.1.x
          5.0.x
          6.0.x
    - name: Use Node.js
      uses: actions/setup-node@v1
      with:
        node-version: '12.x'
    - name: Checkout 
      uses: actions/checkout@v2
    - name: Build Website
      uses: cake-build/cake-action@v1
      with:
        verbosity: Diagnostic
        cake-bootstrap: true
    - name: Deploy netlify   
      if: ${{ github.event_name != 'pull_request' }}    
      run: |
        npm install -g netlify-cli
        netlify deploy --auth=${{ secrets.NETLIFY_DEPLOY_KEY }} --site=${{ secrets.NETLIFY_SITE_ID }} --prod --dir=output

# This is a basic workflow to help you get started with Actions

name: Build website

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  build:
    # The type of runner that the job will run on
    runs-on: windows-latest
    
    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
    - name: Setup dotnet
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: | 
          2.1.x
          3.1.x
          5.0.x
          6.0.x
    - name: Use Node.js
      uses: actions/setup-node@v1
      with:
        node-version: '16.x'
    - name: Checkout 
      uses: actions/checkout@v2
    - name: Build Website
      uses: cake-build/cake-action@v1
      with:
        verbosity: Diagnostic
        cake-bootstrap: true
    - name: Deploy netlify   
      if: ${{ github.event_name != 'pull_request' }}    
      run: |
        npm install -g netlify-cli
        netlify deploy --auth=${{ secrets.NETLIFY_DEPLOY_KEY }} --site=${{ secrets.NETLIFY_SITE_ID }} --prod --dir=output

Update node to latest version
housekeeping: Update node to latest version