-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'docs/getting-started-for-designers' of https://github.c…
…om/digdir/designsystemet into docs/getting-started-for-designers
- Loading branch information
Showing
50 changed files
with
9,290 additions
and
8,326 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 |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
pull_request: | ||
branches: | ||
- main | ||
- next | ||
types: | ||
- opened | ||
- edited | ||
|
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,59 @@ | ||
name: Deploy Storefront | ||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_STOREFRONT }} | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
type: choice | ||
default: next | ||
description: Deploy to environment | ||
options: | ||
- production | ||
- next | ||
push: | ||
branches: | ||
- next | ||
paths: | ||
- 'apps/storefront/**' | ||
jobs: | ||
Deploy-Production: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- 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: 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=${{(steps.defaultenvironment.outputs.value == 'next' && 'preview') || 'production'}} --token=${{ secrets.VERCEL_TOKEN }} | ||
|
||
- name: Build Project Artifacts | ||
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 ${{(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.designsystemet.no | ||
if: steps.defaultenvironment.outputs.value == 'next' |
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,63 @@ | ||
name: Deploy Theme | ||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_THEME }} | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
type: choice | ||
default: next | ||
description: Deploy to environment | ||
options: | ||
- production | ||
- next | ||
pull_request: | ||
types: [opened, synchronize] | ||
paths: | ||
- 'apps/theme/**' | ||
push: | ||
branches: | ||
- next | ||
paths: | ||
- 'apps/theme/**' | ||
jobs: | ||
Deploy-Production: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- 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: 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=${{(steps.defaultenvironment.outputs.value == 'next' && 'preview') || 'production'}} --token=${{ secrets.VERCEL_TOKEN }} | ||
|
||
- name: Build Project Artifacts | ||
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 ${{(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.theme.designsystemet.no | ||
if: steps.defaultenvironment.outputs.value == 'next' |
2 changes: 1 addition & 1 deletion
2
.github/workflows/storefront-preview.yml → .github/workflows/preview-storefront.yml
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
2 changes: 1 addition & 1 deletion
2
.github/workflows/storybook-preview.yml → .github/workflows/preview-storybook.yml
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 was deleted.
Oops, something went wrong.
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
Oops, something went wrong.