Bump gh-pages from 2.2.0 to 5.0.0 #43
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [12.x] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
**/node_modules | |
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | |
- name: Install dependencies | |
run: npm install | |
- name: Run the lints & tests | |
run: npm run test | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
- name: Build | |
run: npm run build | |
- name: Pre Deploy | |
run: npm run pre-deploy | |
- name: Deploy | |
run: | | |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
npm run deploy | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Archive production | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dist | |
path: | | |
dist | |
!dist/**/*.md | |
publish: | |
needs: build | |
if: ${{ github.event_name == 'push' }} # Check its push | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [12.x] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Publish if version has been updated | |
uses: pascalgn/npm-publish-action@1.3.6 | |
with: | |
tag_name: "v%s" | |
tag_message: "v%s" | |
commit_pattern: "^Release (\\S+)" | |
workspace: "." | |
publish_command: "npm" | |
publish_args: "--non-interactive --access public" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
- name: NPM Publish | |
run: echo "Deployed to production server on branch $GITHUB_REF" |