Skip to content

Commit

Permalink
add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiebuilds committed Jul 27, 2020
1 parent c37d45b commit ff2ceb2
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/checks.yml
@@ -0,0 +1,24 @@
name: checks
on: [push]
jobs:
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: "14"
- uses: actions/cache@v1
with:
path: "~/.npm"
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install
run: npm install
- name: Typecheck
run: npm run check
- name: Lint
run: npm run lint
# - name: Test
# run: npm run test
28 changes: 28 additions & 0 deletions .github/workflows/website.yml
@@ -0,0 +1,28 @@
name: Website Deploy
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install
run: npm install
- name: Build
run: npm run build:example
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: example-dist
2 changes: 1 addition & 1 deletion .prettierignore
Expand Up @@ -2,7 +2,7 @@ node_modules
.cache
.github
.rts2_cache_*
# dist
dist
example-dist
LICENSE
package-lock.json
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -36,7 +36,7 @@
"lint": "eslint '**'",
"format": "prettier --write '**'",
"build": "rm -rf dist && microbundle --inline none",
"build:example": "rm -rf website-dist && parcel build example/index.html -d example-dist --public-url ./",
"build:example": "rm -rf example-dist && parcel build example/index.html -d example-dist --public-url ./",
"start": "rm -rf example-dist && parcel example/index.html -d example-dist",
"precommit": "lint-staged",
"prepublishOnly": "npm run -s build"
Expand Down

0 comments on commit ff2ceb2

Please sign in to comment.