Skip to content

Commit

Permalink
Merge 78494d6 into main
Browse files Browse the repository at this point in the history
  • Loading branch information
carbon-bot authored Jun 27, 2024
2 parents 6be1db6 + 78494d6 commit f5d70b1
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,23 @@ jobs:
- name: Build packages and storybook
run: yarn build

# Deploy to staging Github Pages using `gh-pages` package
- name: Deploy
# move storybook-static files to temp folder before checking out to `gh-pages` branch
- name: Move storybook to build folder
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npx gh-pages -d packages/core/storybook-static -u "github-actions-bot <[email protected]>" --dest staging --message "chore(deploy): deploy to gh-pages staging"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
mkdir -p builds
mv packages/core/storybook-static/* builds
# remove old files and push storybook-static files to staging folder
- name: Deploy production environment to Github Pages
run: |
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git config user.name $GITHUB_ACTOR
git fetch origin gh-pages
git checkout -b gh-pages origin/gh-pages
git update-ref -d refs/remotes/origin/gh-pages
git pull origin gh-pages
rm -rf staging
mkdir -p staging
mv builds/* staging
git add staging
git commit -m "chore(deploy): deploy staging storybook to GitHub Pages"
git push origin gh-pages --force

0 comments on commit f5d70b1

Please sign in to comment.