From 1ead44722cd91dbb7b8374127b0f07b5d15774c9 Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Tue, 2 Nov 2021 16:39:51 +0100 Subject: fix(cd): proper cd (#143) * fix(cd): properly end the yml * fix(cd): don't check on main * fix(cd): only test build if ts files are changed * fix(cd): proper ubuntu * fix(cd): use checkout * fix(cd): add filter to cd * fix(cd): ubuntu latest and better excl --- .github/workflows/ci.yml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to '.github/workflows/ci.yml') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f5a928..eb6c347 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,15 +4,32 @@ name: 'ci' on: push: - branches-ignore: - -[main] + branches: + - '!main' defaults: run: shell: 'bash' jobs: + changes: + runs-on: 'ubuntu-latest' + outputs: + ts: ${{ steps.filter.outputs.ts }} + steps: + - uses: actions/checkout@v2 + - name: '[check if build necessary]' + uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + ts: + - '*.ts' + - '*.tsx' + - '*.json' lint-test-build: name: '[ci|lint-test-build]' - runs-on: 'ubuntu-18.04' + runs-on: 'ubuntu-latest' + needs: changes + if: ${{ needs.changes.outputs.ts == 'true' }} steps: - name: '[checkout] ${{ github.repository }} project' uses: 'actions/checkout@v2' -- cgit v1.2.3