Skip to content

Commit

Permalink
chore: Add GHA to deploy github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
WillsonHaw committed Jan 11, 2025
1 parent d3fe727 commit 8c083a7
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions:
pages: write # to deploy to Pages
id-token: write

# env:
Expand All @@ -18,6 +19,8 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
outputs:
published: ${{ steps.changesets.outputs.published }}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -55,3 +58,23 @@ jobs:
# This means that checks won't run on the release PRs. We work around
# this by using our own GH_TOKEN_REPO_ACCESS organization secret.
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_REPO_ACCESS }}

deploy-pages:
needs: release
if: ${{ needs.release.outputs.published == 'true' }}
name: Deploy Docs to GitHub Pages
runs-on: ubuntu-latest

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Upload static files as artifact
uses: actions/upload-pages-artifact@v3
with:
path: apps/storybook/dist/

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 8c083a7

Please sign in to comment.