-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(CI): move Storybook deploy to publish.yml workflow
- Loading branch information
1 parent
bb329dc
commit fca9f93
Showing
2 changed files
with
14 additions
and
59 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Publish NPM packages | ||
name: NPM publish and Storybook deploy | ||
|
||
on: | ||
release: | ||
|
@@ -8,9 +8,14 @@ env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
main: | ||
name: 📦 Publish NPM packages | ||
name: 📦 NPM publish and 📘 Storybook deploy | ||
runs-on: ubuntu-latest | ||
env: | ||
NX_BRANCH: ${{ github.head_ref || github.ref_name }} | ||
|
@@ -42,18 +47,13 @@ jobs: | |
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: 🚀 Publish to NPM registry | ||
- name: 🚀 Publish BEEQ to NPM registry | ||
run: npx nx run-many -t publish -p tag:publishable --parallel=1 --output-style=stream-without-prefixes | ||
|
||
- name: 🔐 Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
- name: 🚚 Deploy BEEQ Storybook to GitHub Pages | ||
uses: bitovi/github-actions[email protected] | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ${{secrets.AWS_S3_BUCKET_REGION}} | ||
|
||
- name: 🚚 Deploy to AWS S3 | ||
run: aws s3 sync dist/storybook/beeq/ s3://${{secrets.AWS_S3_BUCKET}}/ --delete --output table | ||
|
||
- name: 🚮 Invalidate AWS CloudFront distribution cache | ||
run: aws cloudfront create-invalidation --distribution-id ${{secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID}} --paths "/*" --output table --cli-connect-timeout 15 | ||
build_command: npm run build | ||
checkout: false | ||
install_command: npm ci | ||
path: ./dist/storybook/beeq |