-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
98 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: automerge-cwc | ||
on: | ||
push: | ||
branches: [ release-cwc/* ] | ||
|
||
concurrency: | ||
group: automerge-cwc-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
automerge-cwc: | ||
if: github.repository == 'carbon-design-system/carbon-for-ibm-dotcom' | ||
runs-on: ubuntu-20.04 | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Merge to main | ||
uses: devmasx/[email protected] | ||
with: | ||
type: now | ||
target_branch: 'main' | ||
env: | ||
GITHUB_TOKEN: ${{secrets.MERGE_ACTION}} | ||
- uses: act10ns/slack@v2 | ||
with: | ||
status: ${{ job.status }} | ||
if: failure() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: deploy-cwc-next (Deploy storybook environments to Github Pages) | ||
|
||
on: | ||
push: | ||
branches: | ||
- release-cwc/* | ||
|
||
concurrency: | ||
group: deploy-cwc-next-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
carbon-web-components: | ||
if: github.repository == 'carbon-design-system/carbon-for-ibm-dotcom' | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{secrets.MERGE_ACTION}} | ||
- name: Use Node.js 18.x | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18.x' | ||
cache: 'yarn' | ||
- name: Install dependencies | ||
run: yarn install --immutable --immutable-cache | ||
- name: Build project | ||
run: yarn lerna run --scope @carbon/web-components build | ||
|
||
- name: Set env vars | ||
uses: ./.github/actions/set-dotenv | ||
with: | ||
env-file: packages/carbon-web-components/.env | ||
env: | ||
KALTURA_PARTNER_ID: ${{ secrets.KALTURA_PARTNER_ID }} | ||
KALTURA_UICONF_ID: ${{ secrets.KALTURA_UICONF_ID }} | ||
PROFILE_HOST: ${{ secrets.PROFILE_HOST }} | ||
- name: Building @carbon/web-components (next) storybook | ||
run: yarn build-storybook | ||
working-directory: packages/carbon-web-components | ||
- name: Move storybook to build folder | ||
run: | | ||
rm packages/carbon-web-components/.env | ||
mkdir -p builds | ||
mv packages/carbon-web-components/storybook-static builds/carbon-web-components | ||
- name: Deploying @carbon/web-components (next) storybook to Github Pages | ||
run: | | ||
git config --global user.email ${{ secrets.BOT_EMAIL }} | ||
git config --global user.name ${{ secrets.BOT_NAME }} | ||
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 next/carbon-web-components | ||
mkdir -p next | ||
mv builds/carbon-web-components next/carbon-web-components | ||
git add next/carbon-web-components | ||
git commit -m "chore(deploy): deploy Carbon web components next to GitHub Pages" | ||
git push origin gh-pages | ||
- uses: act10ns/slack@v2 | ||
if: failure() | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
with: | ||
status: ${{ job.status }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters