Merge pull request #29 from JnMProjects/web-dev #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CD Scripts π§Ύ for Web Branches β | |
on: | |
push: | |
branches: | |
- web | |
jobs: | |
StoryBook: | |
name: Build StoryBook π | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code π¦ | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup node π¦ | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20.11.0' | |
cache: 'npm' | |
cache-dependency-path: '**/package-lock.json' | |
- name: Install dependencies π¦ | |
run: cd noplus-web && npm i | |
- name: Build Storybook π | |
run: cd noplus-web && npm run build-storybook | |
- name: Send Build to Upload Authority | |
uses: actions/upload-artifact@v2 | |
with: | |
name: storybook | |
path: noplus-web/storybook-static | |
StoryDocs: | |
name: Build StoryDocs π | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code π¦ | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup node π¦ | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20.11.0' | |
cache: 'npm' | |
cache-dependency-path: '**/package-lock.json' | |
- name: Install dependencies π¦ | |
run: cd noplus-web && npm i | |
- name: Build StoryDocs π | |
run: cd noplus-web && npm run build-storydocs | |
- name: Send Build to Upload Authority | |
uses: actions/upload-artifact@v2 | |
with: | |
name: storydocs | |
path: noplus-web/storybook-static | |
upstream: | |
name: Upload Authority π¦ | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
pull-requests: write | |
needs: [StoryBook, StoryDocs] | |
steps: | |
- name: Checkout code π¦ | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Download Storybook π | |
uses: actions/download-artifact@v2 | |
with: | |
name: storybook | |
path: docs/storybook | |
- name: Download StoryDocs π | |
uses: actions/download-artifact@v2 | |
with: | |
name: storydocs | |
path: noplus-web/public/storydocs | |
- name: Upload Authority π¦ | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: 'Update from workflow' | |