From 5379c289c312f2ceae4323b546312e718fd294af Mon Sep 17 00:00:00 2001 From: Pavel Dat Date: Mon, 11 Sep 2023 21:08:16 +0300 Subject: [PATCH] Add deploy stage only on main branch --- .github/workflows/deploy-job.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-job.yml b/.github/workflows/deploy-job.yml index e23776a..7ac8264 100644 --- a/.github/workflows/deploy-job.yml +++ b/.github/workflows/deploy-job.yml @@ -43,12 +43,17 @@ jobs: - name: Install dependencies run: | sudo apt install pycodestyle + - name: Analysing the code with pycodestyle + run: | + pycodestyle src/**/*.py + deploy: + runs-on: ubuntu-latest + needs: test + if: github.ref == 'refs/heads/master' + steps: + - uses: actions/checkout@v3 - name: Download artifacts uses: actions/download-artifact@v3 with: name: built-artifacts path: dist - - name: Analysing the code with pycodestyle - run: | - ls -la - pycodestyle src/**/*.py