Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
],
"commit": false,
"access": "public",
"baseBranch": "develop"
"baseBranch": "v2"
}
30 changes: 5 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [develop, beta]
branches: [v2, main]
pull_request:
branches: [develop, beta]
branches: [v2, main]

jobs:
build-and-test:
Expand Down Expand Up @@ -50,11 +50,9 @@ jobs:

release:
name: Release (latest or beta)
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/beta'
if: github.ref == 'refs/heads/v2' || github.ref == 'refs/heads/main'
needs: [build-and-test]
runs-on: ubuntu-latest
outputs:
published: ${{ steps.changesets.outputs.published }}
steps:
- uses: actions/checkout@v5
- name: Setup Node.js environment
Expand All @@ -74,8 +72,8 @@ jobs:
publish: npm run release
title: "chore(new-release)"
commit: "chore(new-release)"
branch: ${{ github.ref == 'refs/heads/beta' && 'beta' || null }}
createGithubReleases: ${{ github.ref == 'refs/heads/develop' }}
branch: ${{ github.ref == 'refs/heads/main' && 'main' || null }}
createGithubReleases: ${{ github.ref == 'refs/heads/v2' }}
env:
GITHUB_TOKEN: ${{ secrets.STACKS_TOOLING_GH_RW_PAT }}
NPM_TOKEN: ${{ secrets.NPM_API_KEY }}
Expand All @@ -92,24 +90,6 @@ jobs:
This is a technical user which does not trigger actions workflows on push events.
See this GH issue for more details: https://github.com/changesets/action/issues/187

update-docs:
name: Update main site stackoverflow.design
if: ${{ needs.release.outputs.published == 'true' && github.ref == 'refs/heads/develop' }}
needs: [build-and-test, release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: 🔄 Update stackoverflow.design docs
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git fetch origin
git checkout production
git merge --no-ff --allow-unrelated-histories origin/develop -m "chore: merge develop into production"
git push origin production
env:
GITHUB_TOKEN: ${{ secrets.STACKS_TOOLING_GH_RW_PAT }}

# cancel the jobs if another workflow is kicked off for the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
100 changes: 1 addition & 99 deletions netlify.toml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abovedave Out of curiosity, why did the netlify.toml file move here?

Original file line number Diff line number Diff line change
Expand Up @@ -11,102 +11,4 @@
# IMPORTANT!: Git LFS settings can't be changed in the .toml file. You will need to set this environment
# variable through the Netlify UI otherwise netlify won't be able to clone the repo due to all our images.
# https://docs.netlify.com/build/configure-builds/environment-variables/#netlify-configuration-variables
GIT_LFS_ENABLED = "true" # just here as a reminder

# Renamed pages
[[redirects]]
from = "/product/base/grid"
to = "/product/base/flex"

[[redirects]]
from = "/product/base/pointer-events"
to = "/product/base/interactivity"

[[redirects]]
from = "/product/guidelines/releasing/"
to = "https://github.com/StackExchange/Stacks#release-a-new-version-of-stacks"

[[redirects]]
from = "/assets/img/logo-stacks@2x.png"
to = "/assets/img/logos/so/logo-stacks@2x.png"

# Brand & copywriting → new site
[[redirects]]
from = "/content"
to = "https://stackoverflow.design/copy"
status = 302

[[redirects]]
from = "/content/guidelines/principles"
to = "https://stackoverflow.design/copy"
status = 302

[[redirects]]
from = "/content/guidelines/voice-and-tone"
to = "https://stackoverflow.design/copy/voice"
status = 302

[[redirects]]
from = "/content/guidelines/grammar-and-mechanics/"
to = "https://stackoverflow.design/copy/styleguide#grammar-and-mechanics"
status = 302

[[redirects]]
from = "/content/examples/alt-text/"
to = "https://stackoverflow.design/system/accessibility/alt"
status = 302

[[redirects]]
from = "/content/examples/error-messages/"
to = "https://stackoverflow.design/copy/patterns/messages#error-messages"
status = 302

[[redirects]]
from = "/content/examples/preferences-settings/"
to = "https://stackoverflow.design/copy/patterns/settings"
status = 302

[[redirects]]
from = "/content/examples/success-messages/"
to = "https://stackoverflow.design/copy/patterns/messages#success-messages"
status = 302

[[redirects]]
from = "/brand"
to = "https://stackoverflow.design/brand"
status = 302

[[redirects]]
from = "/brand/colors"
to = "https://stackoverflow.design/brand/color"
status = 302

[[redirects]]
from = "/brand/copywriting/concepts"
to = "https://stackoverflow.design/copy/styleguide#post-scores"
status = 302

[[redirects]]
from = "/brand/copywriting/naming"
to = "https://stackoverflow.design/copy/naming"
status = 302

[[redirects]]
from = "/brand/data-visualization"
to = "https://stackoverflow.design/brand"
status = 302

[[redirects]]
from = "/brand/logo"
to = "https://stackoverflow.design/brand/logo"
status = 302

[[redirects]]
from = "/brand/typography"
to = "https://stackoverflow.design/brand/typography"
status = 302

[[redirects]]
from = "/brand/principles"
to = "https://stackoverflow.design/copy/voice"
status = 302
GIT_LFS_ENABLED = "true" # just here as a reminder
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we not need any of the redirects from packages/stacks-docs/netlify.toml?

Loading