Merge pull request #11145 from ariellalgilmore/fix/video-player-v2-al… #162
Workflow file for this run
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
name: deploy-dotcom-v2 (Deploy storybook environments to GitHub Pages) | |
on: | |
push: | |
branches: | |
- feat/carbon-for-ibm-dotcom-v2 | |
concurrency: | |
group: deploy-dotcom-v2${{ 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@v3 | |
with: | |
token: ${{secrets.MERGE_ACTION}} | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
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: Building @carbon/web-components storybook | |
run: yarn build-storybook | |
working-directory: packages/carbon-web-components | |
- name: Move storybook to build folder | |
run: | | |
mkdir -p builds | |
mv packages/carbon-web-components/storybook-static builds/carbon-web-components-v2 | |
- name: Deploying @carbon/web-components v2 beta 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 v2/carbon-web-components-v2 | |
mkdir -p v2 | |
mv builds/carbon-web-components-v2 v2/carbon-web-components-v2 | |
git add v2/carbon-web-components-v2 | |
git commit -m "chore(deploy): deploy @carbon/web-components v2 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 }} | |
web-components: | |
if: github.repository == 'carbon-design-system/carbon-for-ibm-dotcom' | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{secrets.MERGE_ACTION}} | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --immutable --immutable-cache | |
- name: Build project | |
run: yarn lerna run --ignore @carbon/ibmdotcom-react build | |
- name: Set env vars | |
uses: ./.github/actions/set-dotenv | |
with: | |
env-file: packages/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/ibmdotcom-web-components storybook | |
run: yarn build-storybook | |
working-directory: packages/web-components | |
- name: Move storybook to build folder | |
run: | | |
rm packages/web-components/.env | |
mkdir -p builds | |
mv packages/web-components/storybook-static builds/web-components | |
- name: Set env vars (RTL) | |
uses: ./.github/actions/set-dotenv | |
with: | |
env-file: packages/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/ibmdotcom-web-components RTL storybook | |
run: yarn build-storybook:rtl | |
working-directory: packages/web-components | |
- name: Move storybook to build folder | |
run: | | |
rm packages/web-components/.env | |
mv packages/web-components/storybook-static-rtl builds/web-components-rtl | |
- name: Set env vars (experimental) | |
uses: ./.github/actions/set-dotenv | |
with: | |
env-file: packages/web-components/.env | |
env: | |
KALTURA_PARTNER_ID: ${{ secrets.KALTURA_PARTNER_ID }} | |
KALTURA_UICONF_ID: ${{ secrets.KALTURA_UICONF_ID }} | |
PROFILE_HOST: ${{ secrets.PROFILE_HOST }} | |
C4D_FLAGS_ALL: true | |
- name: Building @carbon/ibmdotcom-web-components experimental storybook | |
run: yarn build-storybook:experimental | |
working-directory: packages/web-components | |
- name: Move storybook to build folder | |
run: | | |
rm packages/web-components/.env | |
mv packages/web-components/storybook-static-experimental builds/web-components-experimental | |
- name: Set env vars (react wrapper) | |
uses: ./.github/actions/set-dotenv | |
with: | |
env-file: packages/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/ibmdotcom-web-components react wrapper storybook | |
run: yarn build-storybook:react | |
working-directory: packages/web-components | |
- name: Move storybook to build folder | |
run: | | |
rm packages/web-components/.env | |
mv packages/web-components/storybook-static-react builds/web-components-react | |
- name: Deploying @carbon/ibmdotcom-web-components 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 v2/web-components | |
rm -rf v2/web-components-react | |
rm -rf v2/web-components-rtl | |
rm -rf v2/web-components-experimental | |
mkdir -p v2 | |
mv builds/web-components v2/web-components | |
mv builds/web-components-react v2/web-components-react | |
mv builds/web-components-rtl v2/web-components-rtl | |
mv builds/web-components-experimental v2/web-components-experimental | |
git add v2/web-components | |
git add v2/web-components-react | |
git add v2/web-components-rtl | |
git add v2/web-components-experimental | |
git commit -m "chore(deploy): deploy Web Components v2 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 }} |