From 25c8b2159bdc57ec7b00ef2ce2c870b07e6e1cfe Mon Sep 17 00:00:00 2001 From: Basti Ortiz <39114273+BastiDood@users.noreply.github.com> Date: Fri, 26 Jan 2024 02:08:55 +0800 Subject: [PATCH] feat(ci): add GitHub Actions workflow --- .github/workflows/ci.yml | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0814fd3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: Code Quality + +on: + workflow_dispatch: + pull_request: + push: + branches: main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install `pnpm` via Corepack + run: corepack enable + - name: Get `pnpm` Store Directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + - uses: actions/cache@v3 + name: Setup `pnpm` Cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + - name: Install Dependencies + run: pnpm install + - name: Check Formatters + run: pnpm fmt + - name: Check HTML + run: pnpm lint:html + - name: Check CSS + run: pnpm lint:css + - name: Synchronize SvelteKit + run: pnpm sync + - name: Check JavaScript + run: pnpm lint:js + - name: Check Svelte + run: pnpm lint:svelte + - name: Build Website + run: pnpm build