Skip to content

Commit

Permalink
Merge branch 'select-read-only-docs-2' of https://github.com/laurenmr…
Browse files Browse the repository at this point in the history
  • Loading branch information
andreancardona committed Mar 9, 2023
2 parents 70d0594 + b77a901 commit 600315c
Show file tree
Hide file tree
Showing 1,330 changed files with 36,540 additions and 28,172 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"extends": ["wesbos"],
"extends": ["carbon"],
"globals": {
"fathom": "readonly"
},
"root": true,
"rules": {
"react/prop-types": 0,
"react/destructuring-assignment": 0,
Expand Down
9 changes: 3 additions & 6 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# Default to the system team
* @carbon-design-system/developers-system
# Default to system one design and one dev
* @carbon-design-system/developers-system @carbon-design-system/design

*.conf @vpicone

# If updating content (mdx) opt for systems team
*.mdx @carbon-design-system/developers-system @carbon-design-system/content

# Vikki Paterson is code owner for Experimental IDE patterns
src/pages/community/patterns/create-flows/* @vikkipaterson
src/pages/community/patterns/delete-pattern/* @vikkipaterson
Expand All @@ -29,7 +26,7 @@ src/pages/community/patterns/login-pattern/* @lukefirth
src/pages/data-visualization/* @theiliad @natashadecoste

# Cal Smith for Angular tutorial
/src/pages/tutorial/angular/* @cal-smith
/src/pages/tutorial/angular/* @zvonimirfras

# Lee Chase for Vue tutorial
/src/pages/tutorial/vue/* @lee-chase
11 changes: 11 additions & 0 deletions .github/workflows/add-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Add To Project

on:
issues:
types: [opened, labeled]

jobs:
issue-triage:
uses: carbon-design-system/carbon/.github/workflows/add-to-project.yml@main
secrets:
ADD_TO_PROJECT_PAT: ${{ secrets.ADD_TO_PROJECT_PAT }}
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: ci
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/[email protected]
with:
node-version: '16.x'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Check formatting of project files
run: yarn format:check

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/[email protected]
with:
node-version: '16.x'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Lint JavaScript files
run: yarn lint:js
4 changes: 2 additions & 2 deletions .github/workflows/dco.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- name: "DCO Assistant"
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the DCO document and I hereby sign the DCO.') || github.event_name == 'pull_request_target'
uses: cla-assistant/github-action@v2.1.2-beta
uses: cla-assistant/github-action@v2.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
Expand All @@ -28,4 +28,4 @@ jobs:
custom-pr-sign-comment: "I have read the DCO document and I hereby sign the DCO."
custom-allsigned-prcomment: "All contributors have signed the DCO."
lock-pullrequest-aftermerge: false
use-dco-flag: true
use-dco-flag: true
62 changes: 38 additions & 24 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Deployment status

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
workflow_dispatch:
inputs:
Expand All @@ -10,35 +14,45 @@ on:
- main

jobs:
build:
runs-on: macos-latest

gh-pages:
if: github.repository == 'carbon-design-system/carbon-website'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v2-beta
- uses: actions/checkout@v3
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 14.x

node-version: 16.x
- name: Install packages
run: yarn install --frozen-lockfile --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

- name: Install IBM Cloud CLI
run: curl -fsSL https://clis.cloud.ibm.com/install/osx | sh

- name: Install Cloud Foundry CLI
run: ibmcloud cf install -v 6.51.0

- name: Login to ibmcloud
env:
API_KEY: ${{ secrets.API_KEY }}
run:
ibmcloud login -a "https://cloud.ibm.com" -u apikey -p "$API_KEY" -o
"carbon-design-system" -s "production" -r "us-south"

- name: Deploy website
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: |
ibmcloud cf v3-zdt-push carbon-website -b https://github.com/cloudfoundry/nginx-buildpack.git
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 }}
12 changes: 12 additions & 0 deletions .github/workflows/issue-triage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Issue Triage
on:
issues:
types: [opened]
issue_comment:
types: [created]
jobs:
issue-triage:
uses: carbon-design-system/carbon/.github/workflows/issue-triage.yml@main
secrets:
APP_ID: ${{ secrets.APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
29 changes: 29 additions & 0 deletions .github/workflows/platform-content-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Sync content with platform

on:
push:
branches:
- 'main'
paths:
- '**.mdx'

jobs:
create_issue:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: carbon-design-system/carbon-platform
ref: main
- name: Generate token
uses: tibdex/github-app-token@v1
id: generate_token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Create issue on platform repo
run: |
gh issue create --title "[Content sync]: carbon-website" --label "role: dev 🤖" --label "service: web-app 🌎" --body 'A pull request on carbon-website was just merged. It contains .mdx content changes that may need to be synced to platform:
- ${{ github.event.compare }}'
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
58 changes: 58 additions & 0 deletions .github/workflows/sync-platform-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Sync Platform Branch
on:
schedule:
# Runs on Fridays 6:00 UTC (-6 CT, -5 EST)
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
- cron: 0 6 * * 5

# Enable running this workflow manually from the Actions tab
workflow_dispatch: # Allow for running this manually.

jobs:
sync-branches:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Create PR branch 🤖
run: |
git branch carbon-platform-sync
git push origin carbon-platform-sync
- name: Create Pull Request
uses: actions/github-script@v6
with:
script: |
const { repo, owner } = context.repo;
const result = await github.rest.pulls.create({
title: 'Sync carbon-platform branch',
owner,
repo,
head: 'carbon-platform-sync',
base: 'carbon-platform',
body: [
'Platform Sync, pulling in new content from main into carbon-platform branch',
'This PR is auto-generated by [actions/github-script](https://github.com/actions/github-script).',
"**Note**: It’s ok for the CI cheks to fail on this PR, this code is not runnable due to the platform changes"
].join('\n')
});
github.rest.issues.addLabels({
owner,
repo,
issue_number: result.data.number,
labels: ['status: enable automerge 🟠', 'status: ready for review 👀']
});
github.rest.pulls.requestReviewers({
owner,
repo,
pull_number: result.data.number,
reviewers: ['francinelucca', 'andreancardona', 'alisonjoseph']
});
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,11 @@ public
# Vscode settings
.vscode/settings.json

# Jetbrains
.idea

# Build timestamp
build-timestamp

.now
.vercel
.vercel
3 changes: 2 additions & 1 deletion .kodiak.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
version = 1

[merge]
automerge_label = "status: ready to merge 🎉"
automerge_label = ["status: ready to merge 🎉", "status: enable automerge 🟠"]
notify_on_conflict = "false"
method = "squash"
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16
13 changes: 0 additions & 13 deletions .vscode/settings.json

This file was deleted.

4 changes: 4 additions & 0 deletions conf.d/rewrite.conf
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,7 @@ rewrite /tutorial/vue/(.*) /developing/vue-tutorial/\$1 permanent;
# Data-visualization
rewrite /data-visualization/basic-charts/ /data-visualization/simple-charts/ permanent;
rewrite /data-visualization/advanced-charts/ /data-visualization/complex-charts/ permanent;

#v11
rewrite https://v11.carbondesignsystem.com/migrating/guide/\$1 /migrating/guide/\$1 permanent;
rewrite /whats-happening/v11-release /migrating/guide/\$1 permanent;
1 change: 0 additions & 1 deletion gatsby-browser.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/* eslint-disable import/prefer-default-export */
import './src/styles/index.scss';
10 changes: 5 additions & 5 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ module.exports = {
keywords:
'IBM, design, system, Carbon, design system, Bluemix, styleguide, style, guide, components, library, pattern, kit, component, cloud',
},
flags: {
PRESERVE_WEBPACK_CACHE: true,
FAST_DEV: true,
FAST_REFRESH: true,
},
plugins: [
{
resolve: 'gatsby-source-filesystem',
Expand Down Expand Up @@ -54,6 +49,10 @@ module.exports = {
baseUrl: 'https://github.com/carbon-design-system/carbon-website',
subDirectory: '',
},
mediumAccount: 'carbondesign',
theme: {
homepage: 'white',
},
},
},
{
Expand All @@ -78,5 +77,6 @@ module.exports = {
},
},
'gatsby-plugin-remove-serviceworker',
'gatsby-plugin-meta-redirect',
],
};
Loading

0 comments on commit 600315c

Please sign in to comment.