diff --git a/.github/workflows/storybook-deploy-vercel.yml b/.github/workflows/storybook-deploy-vercel.yml index 01983ba3dc..1e8d77043d 100644 --- a/.github/workflows/storybook-deploy-vercel.yml +++ b/.github/workflows/storybook-deploy-vercel.yml @@ -1,12 +1,24 @@ -name: Deploy Storybook Production +name: Deploy Storybook env: VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_STORYBOOK }} + on: workflow_dispatch: + inputs: + environment: + type: choice + description: Deploy to environment + options: + - production + - next push: branches: - - main + - next + paths: + - 'packages/**' + - 'apps/storybook/**' + - 'assets/**' jobs: deploy: name: Build & deploy to Vercel @@ -30,12 +42,22 @@ jobs: - name: Install Vercel CLI run: yarn add vercel@latest + - name: Set default environment value if push event is triggered + id: defaultenvironment + run: | + ENVIRONMENT=${{ github.event.inputs.environment }} + echo "value=${ENVIRONMENT:-"next"}" >> "$GITHUB_OUTPUT" + - name: Pull Vercel Environment Information - run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} + run: vercel pull --yes --environment=${{(steps.defaultenvironment.outputs.value == 'next' && 'preview') || 'production'}} --token=${{ secrets.VERCEL_TOKEN }} - name: Build Project Artifacts - run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} + run: vercel build ${{(steps.defaultenvironment.outputs.value == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }} - id: deploy name: Deploy Project Artifacts to Vercel - run: echo "url=$(vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }})" >> $GITHUB_OUTPUT + run: echo "url=$(vercel deploy --prebuilt ${{(steps.defaultenvironment.outputs.value == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }})" >> $GITHUB_OUTPUT + + - name: Set Vercel alias + run: vercel alias --token=${{ secrets.VERCEL_TOKEN }} --scope=${{ secrets.VERCEL_TEAM }} set ${{ steps.deploy.outputs.url }} next.storybook.designsystemet.no + if: steps.defaultenvironment.outputs.value == 'next' diff --git a/.github/workflows/storybook-deploy.yml b/.github/workflows/storybook-deploy.yml deleted file mode 100644 index a2e48cb72e..0000000000 --- a/.github/workflows/storybook-deploy.yml +++ /dev/null @@ -1,51 +0,0 @@ -# Builds and deploys Storybook to github pages -# Requires github pages source settings to target the branch and folder in the deploy step from this action -name: Deploy Storybook Production -on: - workflow_dispatch: - push: - branches: - - main -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Use node 20 and yarn cache - uses: actions/setup-node@v4 - with: - node-version: '20' - cache: 'yarn' - - - name: Install dependencies - run: yarn install --frozen-lockfile - - - name: Build - run: yarn build - - - name: Build Storybook - run: yarn build:storybook - - - name: Upload artifact - uses: actions/upload-pages-artifact@v2 - with: - name: github-pages - path: dist/storybook - # https://github.com/actions/deploy-pages - deploy: - needs: build - permissions: - pages: write - id-token: write - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v2 - with: - artifact_name: github-pages diff --git a/.github/workflows/storybook-preview.yml b/.github/workflows/storybook-preview.yml index d3d9921f34..c7e766f955 100644 --- a/.github/workflows/storybook-preview.yml +++ b/.github/workflows/storybook-preview.yml @@ -1,4 +1,4 @@ -name: Deploy Storybook Preview +name: Deploy Storybook PR Preview env: VERCEL_TEAM: ${{ secrets.VERCEL_TEAM }} VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} diff --git a/README.md b/README.md index 97013aa131..3f6918d42a 100644 --- a/README.md +++ b/README.md @@ -23,14 +23,18 @@ Our goal is to create consistent and user-friendly experiences in digital soluti ## 🔗 Links -[Storybook](https://storybook.designsystemet.no/) - For developing and testing our React components. +[Storybook](https://storybook.designsystemet.no/) - Preview for React components. [Storefront](https://designsystemet.no/) - General documentation about the design system. +[Theme](https://theme.designsystemet.no/) - Theme builder. + --- ## 📦 Packages +[`@digdir/designsystemet`](https://www.npmjs.com/package/@digdir/designsystemet) - CLI for Designsystemet. + [`@digdir/designsystemet-theme`](https://www.npmjs.com/package/@digdir/designsystemet-theme) - Themes for Designsystemet. [`@digdir/designsystemet-css`](https://www.npmjs.com/package/@digdir/designsystemet-css) - Styling for components. diff --git a/apps/storefront/components/Blog/Contributors/Contributors.module.css b/apps/storefront/components/Blog/Contributors/Contributors.module.css index 63765509b7..69571ce45b 100644 --- a/apps/storefront/components/Blog/Contributors/Contributors.module.css +++ b/apps/storefront/components/Blog/Contributors/Contributors.module.css @@ -55,7 +55,7 @@ height: 7px; transform: rotate(45deg); border-radius: 1px; - background-color: var(--ds-color-brand1-6); + background-color: var(--ds-color-brand1-7); margin: auto 0; break-after: avoid; } diff --git a/apps/storefront/components/Footer/Footer.tsx b/apps/storefront/components/Footer/Footer.tsx index e070e9c393..17d4a9b7a4 100644 --- a/apps/storefront/components/Footer/Footer.tsx +++ b/apps/storefront/components/Footer/Footer.tsx @@ -2,10 +2,9 @@ import type { ReactNode } from 'react'; import Image from 'next/image'; import { EnvelopeClosedIcon } from '@navikt/aksel-icons'; import NextLink from 'next/link'; -import { Heading, Paragraph } from '@digdir/designsystemet-react'; +import { Heading, Paragraph, Link } from '@digdir/designsystemet-react'; import { Container } from '../Container/Container'; -import { Link } from '../Link/Link'; import classes from './Footer.module.css'; @@ -28,7 +27,12 @@ const rightLinks = [ { text: 'designsystem@digdir.no', url: 'mailto:designsystem@digdir.no', - prefix: