name: Build Hugo

on:
  push:
    branches:
      - develop

jobs:
  build:
    
    runs-on: ubuntu-latest
    steps: 
    - uses: actions/checkout@v2

    - name: Setup Node
      uses: actions/setup-node@v1
      with:
        node-version: '12.x'

    - name: Setup Hugo
      uses: peaceiris/actions-hugo@v2
      with:
        hugo-version: 'latest'
        extended: true

    - name: npm install
      run: |
        cd ./site
        npm install

    - name: Build
      run: |
        cd ./site
        npm run build

    - name: Deploy
      uses: peaceiris/actions-gh-pages@v3
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        publish_dir: ./site/public
name: Build Hugo

on:
  push:
    branches:
      - develop
      - master

jobs:
  build:
    
    runs-on: ubuntu-latest
    steps: 
    - uses: actions/checkout@v2

    - name: Setup Node
      uses: actions/setup-node@v1
      with:
        node-version: '12.x'

    - name: Setup Hugo
      uses: peaceiris/actions-hugo@v2
      with:
        hugo-version: 'latest'
        extended: true

    - name: npm install
      run: |
        cd ./site
        npm install

    - name: Build
      run: |
        cd ./site
        npm run build

    - name: Deploy
      uses: peaceiris/actions-gh-pages@v3
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        publish_dir: ./site/public
Build hugo on both master and develop branch
Build hugo on both master and develop branch
