From 7b1a00ebfcb8d8f2c02a5f49bdcc95727f43e99d Mon Sep 17 00:00:00 2001 From: Martin <901824+martinstark@users.noreply.github.com> Date: Thu, 4 Apr 2024 10:59:10 +0200 Subject: [PATCH] chore: add pr workflows --- .github/workflows/run-prettier.yml | 29 +++++++++++++++++++ .../{dispath.yml => run-release.yml} | 2 +- .github/workflows/run-typescript.yml | 29 +++++++++++++++++++ 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/run-prettier.yml rename .github/workflows/{dispath.yml => run-release.yml} (94%) create mode 100644 .github/workflows/run-typescript.yml diff --git a/.github/workflows/run-prettier.yml b/.github/workflows/run-prettier.yml new file mode 100644 index 00000000..572267d1 --- /dev/null +++ b/.github/workflows/run-prettier.yml @@ -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 . diff --git a/.github/workflows/dispath.yml b/.github/workflows/run-release.yml similarity index 94% rename from .github/workflows/dispath.yml rename to .github/workflows/run-release.yml index fb912a9e..137b880c 100644 --- a/.github/workflows/dispath.yml +++ b/.github/workflows/run-release.yml @@ -1,4 +1,4 @@ -name: Manually trigger deploy to demo site +name: Demo Site Deploy on: workflow_dispatch jobs: diff --git a/.github/workflows/run-typescript.yml b/.github/workflows/run-typescript.yml new file mode 100644 index 00000000..5ce037a4 --- /dev/null +++ b/.github/workflows/run-typescript.yml @@ -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