diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000000..1ffe6fde13 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,41 @@ +name: publish + +on: + pull_request: + branches: [main] + push: + branches: [main] + +jobs: + checks: + if: github.event_name != 'push' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: '14.x' + - name: Test Build + run: | + yarn install --frozen-lockfile + npm run build + gh-release: + if: github.event_name != 'pull_request' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: '14.x' + - uses: webfactory/ssh-agent@v0.5.0 + with: + ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }} + - name: Release to GitHub Pages + env: + USE_SSH: true + GIT_USER: git + run: | + git config --global user.email "jakeboone02@gmail.com" + git config --global user.name "Jake Boone" + yarn install --frozen-lockfile + npm run deploy