From 3004db903c96275f1e10f605b7682c49f08cd7dc Mon Sep 17 00:00:00 2001 From: Kyle Pfromer Date: Fri, 13 Aug 2021 13:14:54 -0600 Subject: [PATCH 1/5] chore: change `on` section --- .github/workflows/test.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 19a48532..03f98bb4 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,12 +1,9 @@ name: Test and Release on: - push: - branches: - - master pull_request: - branches: - - master + push: + branches: [master] jobs: build: From 069e921f221b8e5fa480d5776848851c662ff142 Mon Sep 17 00:00:00 2001 From: Kyle Pfromer Date: Sat, 14 Aug 2021 14:49:31 -0600 Subject: [PATCH 2/5] feat: add deploy to docusaurus --- .github/workflows/test.yaml | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 03f98bb4..e66eb7ae 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -11,7 +11,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 @@ -50,7 +50,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 @@ -80,4 +80,31 @@ jobs: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - # TODO: deploy docs website + gh-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 From f3170e7d98f9444eacb2ca0b55a66c3e1209e1f3 Mon Sep 17 00:00:00 2001 From: Kyle Pfromer Date: Sat, 14 Aug 2021 14:51:36 -0600 Subject: [PATCH 3/5] chore: delete travis ci file --- .travis.yml | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 .travis.yml 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 From b3d7d3e865461826f7d7e4f1990fa65a5ac0808e Mon Sep 17 00:00:00 2001 From: Kyle Pfromer Date: Sat, 14 Aug 2021 14:52:48 -0600 Subject: [PATCH 4/5] fix: change `build` stage name to `test` --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e66eb7ae..a92ced75 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -6,7 +6,7 @@ on: branches: [master] jobs: - build: + test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 From 3b2f33baec4358ef06d4436fc3c85bf348e71f56 Mon Sep 17 00:00:00 2001 From: Kyle Pfromer Date: Sat, 14 Aug 2021 14:59:35 -0600 Subject: [PATCH 5/5] fix: add coverall repo token --- .github/workflows/test.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a92ced75..8ed815cb 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -34,6 +34,8 @@ jobs: - name: Test run: yarn coverage + env: + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} - name: Lint run: yarn lint @@ -41,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 @@ -80,7 +82,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - gh-release: + docs-release: if: github.event_name == 'push' && github.ref == 'refs/heads/master' runs-on: ubuntu-latest steps: