forked from carbon-design-system/carbon-website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'select-read-only-docs-2' of https://github.com/laurenmr…
- Loading branch information
Showing
1,330 changed files
with
36,540 additions
and
28,172 deletions.
There are no files selected for viewing
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
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
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
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 }} |
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
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 |
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
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
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: | ||
|
@@ -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 }} |
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
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 }} |
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
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 }} |
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
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'] | ||
}); |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v16 |
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
/* eslint-disable import/prefer-default-export */ | ||
import './src/styles/index.scss'; |
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
Oops, something went wrong.