Skip to content

Commit 8c083a7

Browse files
committed
chore: Add GHA to deploy github pages
1 parent d3fe727 commit 8c083a7

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
concurrency: ${{ github.workflow }}-${{ github.ref }}
99

1010
permissions:
11+
pages: write # to deploy to Pages
1112
id-token: write
1213

1314
# env:
@@ -18,6 +19,8 @@ jobs:
1819
release:
1920
name: Release
2021
runs-on: ubuntu-latest
22+
outputs:
23+
published: ${{ steps.changesets.outputs.published }}
2124
steps:
2225
- uses: actions/checkout@v4
2326
with:
@@ -55,3 +58,23 @@ jobs:
5558
# This means that checks won't run on the release PRs. We work around
5659
# this by using our own GH_TOKEN_REPO_ACCESS organization secret.
5760
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_REPO_ACCESS }}
61+
62+
deploy-pages:
63+
needs: release
64+
if: ${{ needs.release.outputs.published == 'true' }}
65+
name: Deploy Docs to GitHub Pages
66+
runs-on: ubuntu-latest
67+
68+
environment:
69+
name: github-pages
70+
url: ${{ steps.deployment.outputs.page_url }}
71+
72+
steps:
73+
- name: Upload static files as artifact
74+
uses: actions/upload-pages-artifact@v3
75+
with:
76+
path: apps/storybook/dist/
77+
78+
- name: Deploy to GitHub Pages
79+
id: deployment
80+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)