Skip to content

Commit

Permalink
feat: #29 add github action to deploy storybook to github pages (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
joostme committed Aug 30, 2024
1 parent 0cecb0d commit a00f1e8
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 42 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,69 @@ jobs:
run: npm run lint
- name: Build Package
run: npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build_artifacts
path: |
packages/**/dist/**
**/package.json
**/README.md
**/CHANGELOG.md
!**/node_modules/**
deploy-pages:
permissions:
contents: read
pages: write
id-token: write
runs-on: macos-latest
if: ${{ github.ref == 'refs/heads/main' }}
needs: build
steps:
- name: Download previous build artifacts
uses: actions/download-artifact@v4
with:
name: build_artifacts
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: packages/documentation/dist/
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4

release:
permissions:
id-token: write # to publish with provenance
contents: write # to create release (changesets/action)
issues: write # to post issue comments (changesets/action)
pull-requests: write # to create pull request (changesets/action)
runs-on: macos-latest
if: ${{ github.ref == 'refs/heads/main' }}
concurrency: ${{ github.workflow }}-${{ github.ref }}
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
cache: "npm"
- name: Install Dependencies
run: npm ci
- name: Download previous build artifacts
uses: actions/download-artifact@v4
with:
name: build_artifacts
- name: Version and/or Publish Package
uses: changesets/action@v1
with:
publish: npm run release
version: npm run version
commit: "ci: release package"
title: "ci: release package"
env:
NPM_CONFIG_PROVENANCE: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
42 changes: 0 additions & 42 deletions .github/workflows/release.yml

This file was deleted.

0 comments on commit a00f1e8

Please sign in to comment.