From a63a6fc1c280e437ce18ec660db1bbd3fd2adf7e Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Mon, 3 Jun 2024 15:16:56 +0530 Subject: [PATCH] Separate the actions --- .github/workflows/infra-deploy-staff.yml | 3 --- .github/workflows/infra-lint-staff.yml | 34 ++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/infra-lint-staff.yml diff --git a/.github/workflows/infra-deploy-staff.yml b/.github/workflows/infra-deploy-staff.yml index 507b6fd3bc..7cc1497a38 100644 --- a/.github/workflows/infra-deploy-staff.yml +++ b/.github/workflows/infra-deploy-staff.yml @@ -32,9 +32,6 @@ jobs: - name: Install dependencies run: yarn install - - name: Lint - run: yarn lint - - name: Build run: yarn build diff --git a/.github/workflows/infra-lint-staff.yml b/.github/workflows/infra-lint-staff.yml new file mode 100644 index 0000000000..5c2894281e --- /dev/null +++ b/.github/workflows/infra-lint-staff.yml @@ -0,0 +1,34 @@ +name: "Lint (staff)" + +on: + # Run on every push to a branch other than main that changes infra/staff/ + push: + branches-ignore: [main] + paths: + - "infra/staff/**" + - ".github/workflows/infra-deploy-staff.yml" + +jobs: + deploy: + runs-on: ubuntu-latest + + defaults: + run: + working-directory: infra/staff + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup node and enable yarn caching + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "yarn" + cache-dependency-path: "infra/staff/yarn.lock" + + - name: Install dependencies + run: yarn install + + - name: Lint + run: yarn lint