Skip to content

Commit cd1b25b

Browse files
committed
separate workflows
1 parent 17fccde commit cd1b25b

File tree

3 files changed

+72
-1
lines changed

3 files changed

+72
-1
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build and Publish to NPM
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Lint and Test Checks"]
6+
branches: [master]
7+
types:
8+
- completed
9+
10+
jobs:
11+
build-package-publish-to-npm:
12+
# if: ${{ github.event.workflow_run.conclusion == 'success' && github.repository == 'upnotes-io/react-todo' }}
13+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout 🛎️
17+
uses: actions/checkout@v2.3.1
18+
19+
- name: Use Node.js ${{ matrix.node-version }} 🔧
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: "16.x"
23+
registry-url: "https://registry.npmjs.org"
24+
25+
- name: Install and Build Package 🔧
26+
run: |
27+
yarn
28+
yarn build
29+
echo "Publish to NPMJS workflow works"
30+
31+
# - name: Publish to NPMJS 🚀
32+
# run: yarn publish
33+
# env:
34+
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build Storybook and Deploy to GH Pages
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Lint and Test Checks"]
6+
branches: [master]
7+
types:
8+
- completed
9+
10+
jobs:
11+
build-storybook-deploy-to-gh-pages:
12+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
13+
# if: ${{ github.event.workflow_run.conclusion == 'success' && github.repository == 'upnotes-io/react-todo' }}
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout 🛎️
17+
uses: actions/checkout@v2.3.1
18+
19+
- name: Use Node.js ${{ matrix.node-version }} 🔧
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: "16.x"
23+
cache: "npm"
24+
25+
- name: Install and Build Storybook 🔧
26+
run: |
27+
yarn
28+
yarn build
29+
echo "Deploy Storybook to GH Pages 🚀 works"
30+
31+
# - name: Deploy Storybook to GH Pages 🚀
32+
# uses: JamesIves/github-pages-deploy-action@4.1.7
33+
# with:
34+
# clean: true
35+
# branch: gh-pages # The branch the action should deploy to.
36+
# folder: .out # The folder the action should deploy.
37+
# ssh-key: ${{ secrets.DEPLOY_KEY }} # using ssh key as token does not have permission to build gh-pages - https://github.com/JamesIves/github-pages-deploy-action/tree/dev#using-an-ssh-deploy-key-

.github/workflows/react-todo-ci.yml renamed to .github/workflows/lint-test-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: React Todo CI
1+
name: Lint and Test Checks
22

33
on:
44
push:

0 commit comments

Comments
 (0)