Skip to content

Commit

Permalink
chore: add pr workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
martinstark authored and malmen237 committed Apr 4, 2024
1 parent ce6f6d0 commit e008b76
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/run-prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Prettier Check
on: [pull_request]

jobs:
prettier:
if: "!contains(github.event.pull_request.title, 'WIP!')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Cache node_modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"
- name: Install Dependencies
run: yarn install --immutable
- name: Run Prettier
run: yarn prettier --check .
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Manually trigger deploy to demo site
name: Demo Site Deploy
on: workflow_dispatch

jobs:
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/run-typescript.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Transpile and Build Check
on: [pull_request]

jobs:
builds:
if: "!contains(github.event.pull_request.title, 'WIP!')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Cache node_modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"
- name: Install Dependencies
run: yarn install --immutable
- name: Run Build Command
run: yarn build

0 comments on commit e008b76

Please sign in to comment.