Skip to content

chore(workflows): add types and website area field automatically (#4341) #1803

chore(workflows): add types and website area field automatically (#4341)

chore(workflows): add types and website area field automatically (#4341) #1803

Workflow file for this run

name: Deployment status
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
inputs:
name:
description: 'Reason'
push:
branches:
- main
jobs:
gh-pages:
if: github.repository == 'carbon-design-system/carbon-website'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Install packages
run: yarn install --immutable --network-timeout 300000
- name: Gatsby Cache Folder
uses: actions/cache@v3
id: gatsby-cache-folder
with:
path: .cache
key: ${{ runner.os }}-cache-gatsby
restore-keys: |
${{ runner.os }}-cache-gatsby
- name: Gatsby Public Folder
uses: actions/cache@v3
id: gatsby-public-folder
with:
path: public/
key: ${{ runner.os }}-public-gatsby
restore-keys: |
${{ runner.os }}-public-gatsby
- name: Build site
run: yarn build:clean
env:
GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES: true
NODE_ENV: production
CI: true
- name: Add CNAME record
run: |
echo 'carbondesignsystem.com' > public/CNAME
- name: Deploy
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npx gh-pages -d public -u "github-actions <[email protected]>"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}