-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(Storybook): build on push and deploy on new release
- Loading branch information
Showing
1 changed file
with
23 additions
and
11 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,31 +53,43 @@ 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 | ||
pages: write | ||
if: ${{ github.event_name == 'push' && github.repository == 'DIRACGrid/diracx-web' }} | ||
if: ${{ github.event_name != 'push' || github.repository == 'DIRACGrid/diracx-web' }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
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' }} | ||
|