deploy-canary #1753
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: percy-update-base | |
on: | |
push: | |
branches: | |
- main | |
repository_dispatch: | |
types: [deploy-canary] | |
concurrency: | |
group: percy-update-base-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
percy-update: | |
if: github.repository == 'carbon-design-system/carbon-for-ibm-dotcom-nextjs-test' | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
node-version: ["14.x"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js 14.x | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "14.x" | |
cache: yarn | |
- name: Caching NextJS | |
id: nextjs-cache-build | |
uses: actions/cache@v2 | |
with: | |
path: | | |
.next | |
out | |
key: ${{ runner.os }}-percy-update-${{ github.run_id }} | |
restore-keys: | | |
${{ runner.os }}-percy-update- | |
- name: Install dependencies | |
run: yarn install --immutable --immutable-cache | |
- name: Grab latest canary release | |
run: yarn update-canary | |
- name: Set env vars | |
uses: ./.github/actions/set-dotenv | |
with: | |
env-file: .env | |
env: | |
KALTURA_PARTNER_ID: ${{ secrets.KALTURA_PARTNER_ID }} | |
KALTURA_UICONF_ID: ${{ secrets.KALTURA_UICONF_ID }} | |
PROFILE_HOST: ${{ secrets.PROFILE_HOST }} | |
SASS_PATH: node_modules:src | |
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} | |
- name: Build project | |
run: yarn build | |
- name: Export project | |
run: yarn export | |
- name: Run e2e tests | |
run: yarn test:e2e:local | |
- name: Notify Slack upon failure | |
uses: act10ns/slack@v1 | |
if: failure() | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
with: | |
status: ${{ job.status }} | |
percy-update-upstream: | |
if: github.repository == 'carbon-design-system/carbon-for-ibm-dotcom-nextjs-test' | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
node-version: ["14.x"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js 14.x | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "14.x" | |
cache: yarn | |
- name: Caching NextJS | |
id: nextjs-cache-build | |
uses: actions/cache@v2 | |
with: | |
path: | | |
.next | |
out | |
key: ${{ runner.os }}-percy-update-upstream-${{ github.run_id }} | |
restore-keys: | | |
${{ runner.os }}-percy-update-upstream- | |
- name: Install dependencies | |
run: yarn install --immutable --immutable-cache | |
- name: Grab latest canary release | |
run: yarn update-canary | |
- name: Set env vars | |
uses: ./.github/actions/set-dotenv | |
with: | |
env-file: .env | |
env: | |
KALTURA_PARTNER_ID: ${{ secrets.KALTURA_PARTNER_ID }} | |
KALTURA_UICONF_ID: ${{ secrets.KALTURA_UICONF_ID }} | |
PROFILE_HOST: ${{ secrets.PROFILE_HOST }} | |
SASS_PATH: node_modules:src | |
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_UPSTREAM }} | |
- name: Build project | |
run: yarn build | |
- name: Export project | |
run: yarn export | |
- name: Run e2e tests | |
run: yarn test:e2e:local | |
- name: Notify Slack upon failure | |
uses: act10ns/slack@v1 | |
if: failure() | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
with: | |
status: ${{ job.status }} |