Skip to content

Commit

Permalink
Add deploy step only on main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
karlosos committed Mar 18, 2023
1 parent a1d5310 commit 8528a7c
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploying to GH Pages

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 2

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm install

- name: Run tests
run: npm run test -- --coverage --watchAll=false

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
BRANCH: gh-pages
FOLDER: build

0 comments on commit 8528a7c

Please sign in to comment.