Compressed Images (#4410) #1845
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: 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 <github-actions@github.com>" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |