ci: deploy to gh pages
This commit is contained in:
parent
af4549e576
commit
21c3e449f2
19
.github/workflows/main.yml
vendored
19
.github/workflows/main.yml
vendored
|
|
@ -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 }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue