Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(storybook): documentation migration #3125

Merged
merged 2 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ NX_INTERACTIVE=true

# Default dev environment settings
NODE_ENV=development
STORYBOOK_URL="/preview/"
WATCH_MODE=true

# Optional NX settings
Expand Down
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ To kick-off the project's storybook locally, run:
yarn start
```

This is our development environment, where you can see all the components in action, and develop new components. All components must have a storybook entry. Edits to any of the `*.css`, `*.stories.js`, or `template.js` files in `components/*` will live reload in your browser. For more details about how to work within our Storybook setup, take a look at our [getting started Storybook guide](https://opensource.adobe.com/spectrum-css/preview/?path=/docs/guides-contributing--docs).
This is our development environment, where you can see all the components in action, and develop new components. All components must have a storybook entry. Edits to any of the `*.css`, `*.stories.js`, or `template.js` files in `components/*` will live reload in your browser. For more details about how to work within our Storybook setup, take a look at our [getting started Storybook guide](https://opensource.adobe.com/spectrum-css/?path=/docs/guides-contributing--docs).

This project is leveraging caching from [Nx](https://nx.dev/) to speed up the build process. If you are seeing unexpected results, you can clear the cache by running `yarn nx reset`.

Expand Down
6 changes: 3 additions & 3 deletions .github/GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ _to-do_: This needs to diff the actual content of the files as well. Right now w

Runs stylelint or eslint if any relevant assets have been updated in this PR.

##### 📝 Publish site
##### 📝 Publish documentation site

After the build and visual regression tests have passed, this will build the docs site and publish it to Netlify.
After the build and visual regression tests have passed, this will build the documentation site and publish it to Netlify.

##### 📸 Visual regression testing

Expand All @@ -93,7 +93,7 @@ Builds the `main` branch and outputs the compiled assets as artifacts.

##### 📝 2. Publish site

Publish the docs site to Netlify.
Publish the documentation site to Netlify.

##### 📸 3. Visual regression testing

Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,8 @@ jobs:
# -------------------------------------------------------------
publish_site:
name: Publish
# The build step ensures we are leveraging the cache for the build
needs: [vrt]
# Note: the goal here is to allow vrt to be skipped but still require the build to succeed
if: ${{ always() }}
uses: ./.github/workflows/publish-site.yml
with:
deploy-message: ${{ github.event.pull_request.title }}
alias: pr-${{ github.event.number }}
# Only pass the storybook url if the vrt was successful
storybook-url: ${{ needs.vrt.outputs.storybook-url || '' }}
castastrophe marked this conversation as resolved.
Show resolved Hide resolved
secrets: inherit
5 changes: 0 additions & 5 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ name: Build and verify production
# - Publish the PR branch to Netlify
# -------------------------------------------------------------


on:
push:
branches: [main, spectrum-two]
Expand Down Expand Up @@ -62,11 +61,7 @@ jobs:
# -------------------------------------------------------------
publish_site:
name: Publish
# The build step ensures we are leveraging the cache for the build
needs: [vrt]
uses: ./.github/workflows/publish-site.yml
with:
storybook-url: ${{ needs.vrt.outputs.storybook-url || '' }}
secrets: inherit

todo_to_issue:
Expand Down
20 changes: 2 additions & 18 deletions .github/workflows/publish-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ on:
alias:
required: false
type: string
storybook-url:
required: false
type: string
default: ''
workflow_call:
inputs:
deploy-message:
Expand All @@ -24,10 +20,6 @@ on:
alias:
required: false
type: string
storybook-url:
required: false
type: string
default: ''

permissions:
contents: read
Expand Down Expand Up @@ -75,22 +67,14 @@ jobs:
run: yarn install --immutable

## --- BUILD --- ##
- name: Build docs site
shell: bash
run: yarn build:site
env:
CHROMATIC_URL: ${{ inputs.storybook-url }}

- name: Build storybook site
if: ${{ ! inputs.storybook-url }}
- name: Build storybook
shell: bash
run: yarn nx run storybook:build:docs
run: yarn build:docs

## --- DEPLOY WEBSITE TO NETLIFY --- ##
- name: Deploy
uses: nwtgck/actions-netlify@v3
with:
# publish-dir: site/dist
publish-dir: dist
production-branch: main
production-deploy: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vrt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
exitOnceUploaded: true
onlyChanged: true
traceChanged: true
untraced: ".github/actions/*/package.json site/package.json generator/package.json"
untraced: ".github/actions/*/package.json generator/package.json"
diagnostics: true
autoAcceptChanges: "main"
# Lets VRT pass without running so as not to waste snapshots
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
dist
dist-site
!tokens/dist/index.css
!tokens/dist/css/*.css
!tokens/dist/css/express/*.css
Expand Down
3 changes: 0 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
**/.hg
**/node_modules

# Static utility assets
site/includes/*.js

# Compiled and generated files
dist
.storybook/storybook-static
Expand Down
15 changes: 0 additions & 15 deletions .storybook/deprecated/cyclebutton/cyclebutton.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .storybook/deprecated/quickaction/quickaction.yml

This file was deleted.

104 changes: 0 additions & 104 deletions .storybook/deprecated/searchwithin/searchwithin.yml

This file was deleted.

76 changes: 0 additions & 76 deletions .storybook/deprecated/splitbutton/splitbutton.yml

This file was deleted.

Loading
Loading