diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 19a48532..8ed815cb 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,20 +1,17 @@ name: Test and Release on: - push: - branches: - - master pull_request: - branches: - - master + push: + branches: [master] jobs: - build: + test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Set Node.js + - name: Setup Node.js uses: actions/setup-node@master with: node-version: 10.x @@ -37,6 +34,8 @@ jobs: - name: Test run: yarn coverage + env: + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} - name: Lint run: yarn lint @@ -44,7 +43,7 @@ jobs: - name: Build run: yarn build - release: + npm-release: # Only release on push to master if: github.event_name == 'push' && github.ref == 'refs/heads/master' runs-on: ubuntu-latest @@ -53,7 +52,7 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set Node.js + - name: Setup Node.js uses: actions/setup-node@master with: node-version: 10.x @@ -83,4 +82,31 @@ jobs: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - # TODO: deploy docs website + docs-release: + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: "10.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: | + cd website + + git config --global user.email "kpfromer2@gmail.com" + git config --global user.name "Kyle Pfromer" + + yarn install --frozen-lockfile + + yarn deploy diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index efd41bc1..00000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: node_js - -node_js: "10" - -install: - - npm install - -jobs: - include: - - stage: unit tests with coverage - script: yarn coverage - - stage: run lint and build - script: yarn run lint && yarn build - - stage: npm release - if: NOT type IN (pull_request) - node_js: lts/* - script: - - npx semantic-release - on: master - - stage: deploy documentation - if: branch IN (master) AND NOT type IN (pull_request) - script: - - git config --global user.name "${GH_NAME}" - - git config --global user.email "${GH_EMAIL}" - - echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc - - cd website && yarn install && GIT_USER="${GH_NAME}" yarn deploy - on: master