name: CI

on:
  pull_request:
  push:
    branches:
      - master

jobs:
  build:

    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [8.x, 10.x, 12.x, 14.x]

    steps:
    - uses: actions/checkout@v2

    - name: Set up Python
      uses: actions/setup-python@v2
      with:
          python-version: '3.9'

    - name: Set up Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v2
      with:
        node-version: ${{ matrix.node-version }}

    - name: pre-build
      run: npm install && npx bower install

    - name: build
      run: npx gulp dev:build && npx gulp prod:build

    - name: deploy
      if: github.event_name == 'push' && matrix.node-version == '8.x'
      run: |
        python -m pip install --upgrade pip
        pip install ghp-import
        ghp-import -n dist/dev 
        git push -fq https://${GITHUB_TOKEN}@github.com/AzHicham/navitia-playground.git gh-pages

name: CI

on:
  pull_request:
  push:
    branches:
      - master

jobs:
  build:

    runs-on: ubuntu-latest

    strategy:
      matrix:
        # We deploy with Node 8.x ! We test with Node 14.x for futur upgrade
        node-version: [8.x, 14.x]

    steps:
    - uses: actions/checkout@v2

    - name: Set up Python
      uses: actions/setup-python@v2
      with:
          python-version: '3.9'

    - name: Set up Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v2
      with:
        node-version: ${{ matrix.node-version }}

    - name: pre-build
      run: npm install && npx bower install

    - name: build
      run: npx gulp dev:build && npx gulp prod:build

    - name: deploy
      if: github.event_name == 'push' && matrix.node-version == '8.x'
      run: |
        python -m pip install --upgrade pip
        pip install ghp-import
        ghp-import -n dist/dev 
        git push -fq https://${GITHUB_TOKEN}@github.com/AzHicham/navitia-playground.git gh-pages

Remove Node 10 and 12
Remove Node 10 and 12

