Skip to content

Commit

Permalink
CI: Adds deployment to GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Mintoo200 committed Mar 19, 2024
1 parent f049ea2 commit e6fee02
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,18 @@ jobs:
uses: ./.github/workflows/build-storybook.yml
with:
artifact-name: "storybook-latest"
deploy-page:
needs: build-storybook
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
artifact_name: "storybook-latest"
16 changes: 16 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,19 @@ jobs:
uses: ./.github/workflows/build-storybook.yml
with:
artifact-name: "storybook-${{ github.head_ref }}"
# FIXME (GAFI 19-03-2024): Test
deploy-page:
needs: build-storybook
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
artifact_name: "storybook-${{ github.head_ref }}"
4 changes: 1 addition & 3 deletions .github/workflows/build-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ jobs:
- name: Build
run: npm run storybook:build
- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-pages-artifact@v3
with:
# TODO (GAFI 19-03-2024): Add variable for this to avoid using ref when not provided
name: ${{ env.ARTIFACT_NAME }}
path: ./storybook-static
if-no-files-found: error

0 comments on commit e6fee02

Please sign in to comment.