Merge pull request #1587 from qdraw/feature/202405-update-version #22
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
on: | |
pull_request: | |
branches: [ master ] | |
paths: | |
- 'starsky/starsky/clientapp/.storybook/**' | |
- 'starsky/starsky/clientapp/package.json' | |
- 'starsky/starsky/clientapp/package-lock.json' | |
push: | |
branches: [ master ] | |
paths: | |
- 'starsky/starsky/clientapp/**' | |
workflow_dispatch: | |
name: storybook clientapp netlify | |
jobs: | |
test: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Cache node modules clientapp | |
uses: actions/cache@v4 | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.os }}-build-clientapp-${{ hashFiles('./starsky/starsky/clientapp/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-clientapp- | |
- name: Install Dependencies | |
working-directory: ./starsky/starsky/clientapp | |
run: npm ci --no-progress --prefer-offline --legacy-peer-deps --no-fund | |
- name: build-storybook | |
working-directory: ./starsky/starsky/clientapp | |
run: npm run build-storybook | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: storybook-static | |
path: ./starsky/starsky/clientapp/storybook-static | |
- name: Deploy to Netlify | |
uses: nwtgck/actions-netlify@v3.0 | |
if: github.event_name != 'pull_request' | |
with: | |
publish-dir: './starsky/starsky/clientapp/storybook-static' | |
production-branch: master | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
deploy-message: "Deploy from GitHub Actions" | |
enable-pull-request-comment: false | |
enable-commit-comment: true | |
overwrites-pull-request-comment: true | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
timeout-minutes: 1 |