Skip to content

Commit

Permalink
release: split publish and deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
pbek committed Feb 19, 2024
1 parent 8eb3b9b commit 824fbbd
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/build-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ jobs:
- name: Run lint
run: npm run lint

deploy:
publish:
runs-on: ubuntu-latest
needs: [test]
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/demo' || github.ref == 'refs/heads/production'
if: github.ref == 'refs/heads/main'
environment: ${{ github.ref_name }}

steps:
Expand All @@ -62,7 +62,6 @@ jobs:
cache: 'npm'

- name: Publish to NPM
if: github.ref == 'refs/heads/main'
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
Expand All @@ -73,8 +72,14 @@ jobs:
npm run build
npm run publish
deploy:
runs-on: ubuntu-latest
needs: [test]
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/demo' || github.ref == 'refs/heads/production'
environment: ${{ github.ref_name }}

steps:
- name: Deploy and wait for completion
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/demo' || github.ref == 'refs/heads/production'
uses: digital-blueprint/gitlab-pipeline-trigger-action@v1
with:
host: 'gitlab.tugraz.at'
Expand Down

0 comments on commit 824fbbd

Please sign in to comment.