ci: deploy to gh pages

This commit is contained in:
Nicola Zambello 2021-12-14 10:53:45 +01:00 committed by GitHub
parent af4549e576
commit 21c3e449f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,7 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
name: Test and deploy
on:
push:
@ -12,7 +12,7 @@ on:
jobs:
build:
runs-on: macos-latest
runs-on: ubuntu-latest
strategy:
matrix:
@ -26,5 +26,16 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn
- name: Run compiler
run: yarn tsc
- name: Run tests
run: yarn test
- name: Run build
if: success()
run: yarn build
- name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v2.5.0
with:
target_branch: gh-pages
build_dir: dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}