Updated color tokens for hovered, pressed states of TableRow, Button,… #86
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
name: Vercel Preview Deployment | |
env: | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
TURBO_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
TURBO_REMOTE_ONLY: true | |
on: | |
pull_request | |
concurrency: | |
group: ${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
Deploy-Preview: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Comment PR | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
message: | | |
🌋🌋 Initializing deployment 🔃 | |
🏗️🏗️ Building Next.js 🕧 | |
🚀🚀 Deploying to Vercel 🕧 | |
🛸🛸 Deployed to 🕧 | |
comment_tag: preview_url | |
- name: Checkout main | |
uses: actions/checkout@v3 | |
with: | |
repository: ${{ secrets.WEB_REPO }} | |
ref: main | |
token: ${{ secrets.BOT_PAT }} | |
- name: Set pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 9.x | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
- name: Cache node modules | |
id: cache-node-modules | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: node-modules-${{ hashFiles('./pnpm-lock.yaml') }} | |
- name: Install dependencies | |
if: steps.cache-node-modules.outputs.cache-hit != true | |
run: pnpm i --frozen-lockfile | |
- name: Generate Design Tokens | |
run: | | |
git clone --branch ${{ github.head_ref }} https://github.com/team-settle/settle-design-tokens.git | |
pnpm design-tokens:process | |
rm -rf settle-design-tokens | |
git config user.name "GitHub Actions Bot" | |
git config user.email "<>" | |
git checkout -b design-tokens-preview-${{ github.sha }} | |
- name: Install Vercel CLI | |
run: pnpm i -g vercel@latest | |
- name: Pull Vercel Environment Information | |
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Comment PR | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
message: | | |
🌋🌋 Initializing deployment ✅ | |
🏗️🏗️ Building Next.js 🔃 | |
🚀🚀 Deploying to Vercel 🕧 | |
🛸🛸 Deployed to 🕧 | |
comment_tag: preview_url | |
- name: Build Project Artifacts | |
run: vercel build --token=${{ secrets.VERCEL_TOKEN }} | |
env: | |
NODE_OPTIONS: "--max_old_space_size=4096" | |
- name: Comment PR | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
message: | | |
🌋🌋 Initializing deployment ✅ | |
🏗️🏗️ Building Next.js ✅ | |
🚀🚀 Deploying to Vercel 🔃 | |
🛸🛸 Deployed to 🕧 | |
comment_tag: preview_url | |
- name: Deploy Project Artifacts to Vercel | |
id: deploy | |
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | |
- uses: actions/github-script@v6 | |
id: get-deployment-url | |
with: | |
github-token: ${{ secrets.BOT_PAT }} | |
script: | | |
try { | |
const githubCommitRef = "design-tokens-preview-${{ github.sha }}" | |
const response = await fetch("https://api.vercel.com/v6/deployments?projectId=${{ secrets.VERCEL_PROJECT_ID }}&state=READY&target=preview&teamId=${{ secrets.VERCEL_ORG_ID }}", { | |
"headers": { "Authorization": "Bearer ${{ secrets.VERCEL_TOKEN }}" }, | |
"method": "get" | |
}) | |
const { deployments = []} = await response.json() | |
if (deployments.length > 1) { | |
const deployment = deployments.find((d) => d.meta.githubCommitRef === githubCommitRef) | |
if (deployment) { | |
const deploymentUrl = deployment.url | |
core.setOutput("preview_url", deployment.url) | |
} else { | |
console.log('Deployment with the provided githubCommitRef not found') | |
} | |
} else { | |
console.log('Deployments missing') | |
} | |
} catch (error) { | |
console.log(error) | |
} | |
- name: Comment PR | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
message: | | |
🌋🌋 Initializing deployment ✅ | |
🏗️🏗️ Building Next.js ✅ | |
🚀🚀 Deploying to Vercel ✅ | |
🛸🛸 Deployed to https://${{ steps.get-deployment-url.outputs.preview_url }} | |
comment_tag: preview_url | |