From 5ec46ffdf10bd587e32b07b9eec70aa12b108517 Mon Sep 17 00:00:00 2001 From: Ivan Harasta Date: Mon, 24 Oct 2022 17:45:02 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Add=20github=20actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 26 +++++++++++++++++ .github/workflows/deploy-production.yml | 38 +++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/deploy-production.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1a12c38 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +name: CI + +on: + pull_request: + branches: [master] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x] + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + # cache: 'yarn' + + - run: yarn install + - run: yarn build + + - name: audit + run: yarn audit --level high --groups dependencies diff --git a/.github/workflows/deploy-production.yml b/.github/workflows/deploy-production.yml new file mode 100644 index 0000000..8059c66 --- /dev/null +++ b/.github/workflows/deploy-production.yml @@ -0,0 +1,38 @@ +name: deploy-production + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x] + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + cache: 'yarn' + + - run: yarn install + - run: yarn build + + - name: audit + run: yarn audit --level high --groups dependencies + + deploy: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: akhileshns/heroku-deploy@v3.12.12 + with: + heroku_api_key: ${{secrets.HEROKU_API_KEY}} + heroku_app_name: harasta-dev + heroku_email: ${{secrets.HEROKU_EMAIL}}