name: Deployment
on:
  push:
    branches:
      - master

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
    - run: export CHROME_BIN=chromium-browser
    - run: export DISPLAY=:99.0
    - run: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
    - run: sleep 5
    - uses: actions/checkout@v1
    - uses: actions/setup-node@v1
      with:
        node-version: '8.x'
    - run: mkdir dist
    - run: mkdir dist/js
    - run: npm install
    - run: npm run setup
    - run: npm run build
    - name: GitHub Pages Deployment
      uses: JamesIves/github-pages-deploy-action@master
      if: success()
      env:
        ACCESS_TOKEN: ${{ secrets.GITHUB_PAT }}
        BRANCH: gh-pages
        FOLDER: dist
        CNAME: jsstringconverter.bbody.io
        BUILD_SCRIPT: rm package.json && npm run html:production
        GITHUB_REPOSITORY: git@github.com:bbody/MultilineJavaScriptConverter.git
    - name: NPM Release
      if: success()
      uses: primer/publish@master
      env:
        NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


name: Deployment
on:
  push:
    branches:
      - master

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
    - run: export CHROME_BIN=chromium-browser
    - run: export DISPLAY=:99.0
    - run: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
    - run: sleep 5
    - uses: actions/checkout@v1
    - uses: actions/setup-node@v1
      with:
        node-version: '8.x'
    - run: mkdir dist
    - run: mkdir dist/js
    - run: npm install
    - run: npm run setup
    - run: npm run build
    - name: NPM Release
      if: success()
      uses: primer/publish@master
      env:
        NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    - name: GitHub Pages Deployment
      uses: JamesIves/github-pages-deploy-action@master
      if: success()
      env:
        ACCESS_TOKEN: ${{ secrets.GITHUB_PAT }}
        BRANCH: gh-pages
        FOLDER: dist
        CNAME: jsstringconverter.bbody.io
        BUILD_SCRIPT: npm run html:production && rm package.json
        GITHUB_REPOSITORY: git@github.com:bbody/MultilineJavaScriptConverter.git
    


Remove package.json so husky doesn't run
Remove package.json so husky doesn't run
