From cf0eb822bae9c7ed1d02589c48acdbc7d77a8d6a Mon Sep 17 00:00:00 2001 From: Oscar Dominguez Date: Wed, 19 Mar 2025 14:24:53 +0100 Subject: [PATCH 1/2] ci: add Gravity to CI --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 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 00000000..6003b181 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: Build + +on: + push: + branches: + - main + pull_request: {} + +jobs: + build: + runs-on: ubuntu-latest + name: Build Project + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + - name: Node.js + uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4 + with: + registry-url: "https://registry.npmjs.org" + - name: install dependencies + run: pnpm i + - name: Build project + run: pnpm -r build + - name: Run Gravity + run: pnpx @gravityci/cli "websites/mswjs.io/dist/**/*" + env: + GRAVITY_TOKEN: ${{ secrets.GRAVITY_TOKEN }} From 4ff68ecb0ecd93ad506faad5d6f3217160414bab Mon Sep 17 00:00:00 2001 From: Oscar Dominguez Date: Mon, 21 Apr 2025 14:18:38 +0200 Subject: [PATCH 2/2] ci(gravity): gravity reads GRAVITY_HOST from GH Actions variables --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6003b181..54d94ca5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,3 +29,5 @@ jobs: run: pnpx @gravityci/cli "websites/mswjs.io/dist/**/*" env: GRAVITY_TOKEN: ${{ secrets.GRAVITY_TOKEN }} + GRAVITY_HOST: ${{ vars.GRAVITY_HOST }} +