Skip to content

Commit

Permalink
ci(Storybook): build on push and deploy on new release
Browse files Browse the repository at this point in the history
  • Loading branch information
Loxeris committed Aug 28, 2024
1 parent 60098da commit 0131066
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: npx lerna publish from-package --no-push --no-private --yes

build-deploy-storybook-docs:
build-storybook-docs:
runs-on: ubuntu-latest
permissions:
id-token: write
Expand All @@ -66,18 +66,30 @@ jobs:
with:
node-version: 'latest'
cache: 'npm'

- uses: bitovi/[email protected]
if: ${{ github.ref_name == 'main' }}
with:
build_command: npm run build-storybook -w @dirac-grid/diracx-web-components
path: packages/diracx-web-components/storybook-static
checkout: false


- name: Build documentation
if: ${{ github.ref_name != 'main' }}
run: npm ci && npm run build-storybook -w @dirac-grid/diracx-web-components

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: packages/diracx-web-components/storybook-static

deploy-storybook-docs:
runs-on: ubuntu-latest
permissions:
id-token: write
pages: write
needs: [build-storybook-docs, release-please]
if: needs.release-please.outputs.release_created == 'true'
steps:
- id: deploy
name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
with:
token: ${{ github.token }}


build-deploy-dev-image:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'push' || github.repository == 'DIRACGrid/diracx-web' }}
Expand Down

0 comments on commit 0131066

Please sign in to comment.