Skip to content

Commit

Permalink
update github ci workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
South-Paw committed Feb 28, 2021
1 parent 8463a0f commit e7557cd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- synchronize

jobs:
deployDraftOnAnyPullRequest:
deploy-draft-on-any-pull-request:
name: Deploy draft to Netlify
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.ref != 'refs/heads/master'
Expand All @@ -22,11 +22,11 @@ jobs:
run: npm run build:storybook

- name: Deploy draft to Netlify
uses: South-Paw/action-netlify-deploy@v1.0.4
uses: South-Paw/action-netlify-deploy@v1.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
netlify-site-id: ${{ secrets.NETLIFY_SITE_ID }}
build-dir: "./storybook-static"
github-deployment-environment: development
draft: true
comment-on-pull-request: true
7 changes: 4 additions & 3 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
run: npm ci

- name: Test
run: npm run test
env:
CI: true
run: npm run test

build:
name: Build
Expand All @@ -47,7 +47,7 @@ jobs:
- name: Build Package
run: npm run build

deployDraftOnMasterCommit:
deploy-draft-on-master-commit:
name: Deploy draft to Netlify
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
Expand All @@ -62,11 +62,12 @@ jobs:
run: npm run build:storybook

- name: Deploy draft build to Netlify
uses: South-Paw/action-netlify-deploy@v1.0.4
uses: South-Paw/action-netlify-deploy@v1.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
netlify-site-id: ${{ secrets.NETLIFY_SITE_ID }}
build-dir: "./storybook-static"
github-deployment-environment: development
draft: true
comment-on-commit: true
7 changes: 4 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- created

jobs:
deployProductionOnMasterRelease:
deploy-production-on-master-release:
name: Publish release to Netlify
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'created'
Expand All @@ -21,15 +21,16 @@ jobs:
run: npm run build:storybook

- name: Deploy production to Netlify
uses: South-Paw/action-netlify-deploy@v1.0.4
uses: South-Paw/action-netlify-deploy@v1.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
netlify-site-id: ${{ secrets.NETLIFY_SITE_ID }}
build-dir: "./storybook-static"
github-deployment-environment: production
comment-on-commit: true

publishPackage:
publish-package:
name: Publish
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'created'
Expand Down

0 comments on commit e7557cd

Please sign in to comment.