Skip to content

Commit

Permalink
feat: nohoist with store client workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
yungblud committed Jan 14, 2024
1 parent 4bee809 commit 077304a
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 6 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/deploy-store-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: deploy store-client preview website

on:
pull_request:
paths:
- 'packages/store-client/**'

env:
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}
NOTION_DATABASE_ID: ${{ secrets.NOTION_BLOG_DATABASE_ID }}
CLOUDINARY_API_KEY: ${{ secrets.CLOUDINARY_API_KEY }}
CLOUDINARY_API_SECRET: ${{ secrets.CLOUDINARY_API_SECRET }}
SITE_URL: ${{ secrets.SITE_URL }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_STORE_CLIENT_PROJECT_ID }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
cache: "yarn"
- run: npm config set @coldsurfers:registry https://npm.pkg.github.com/
- run: npm config set '//npm.pkg.github.com/:_authToken' ${{ secrets.GITHUB_TOKEN }}
- run: yarn install --immutable
- run: yarn build
working-directory: ./packages/store-client
- run: npx vercel pull --yes --token ${{ secrets.VERCEL_TOKEN }}
working-directory: ./packages/store-client
- run: npx vercel build
working-directory: ./packages/store-client
- run: npx vercel deploy --prebuilt --token ${{ secrets.VERCEL_TOKEN }}
working-directory: ./packages/store-client
39 changes: 39 additions & 0 deletions .github/workflows/deploy-store-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: deploy store client production website

on:
push:
branches:
- main
paths:
- 'packages/store-client/**'
workflow_dispatch:

env:
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}
NOTION_DATABASE_ID: ${{ secrets.NOTION_BLOG_DATABASE_ID }}
CLOUDINARY_API_KEY: ${{ secrets.CLOUDINARY_API_KEY }}
CLOUDINARY_API_SECRET: ${{ secrets.CLOUDINARY_API_SECRET }}
SITE_URL: ${{ secrets.SITE_URL }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_STORE_CLIENT_PROJECT_ID }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
cache: "yarn"
- run: npm config set @coldsurfers:registry https://npm.pkg.github.com/
- run: npm config set '//npm.pkg.github.com/:_authToken' ${{ secrets.GITHUB_TOKEN }}
- run: yarn install --immutable
- run: yarn build
working-directory: ./packages/store-client
- run: npx vercel pull --yes --token ${{ secrets.VERCEL_TOKEN }}
working-directory: ./packages/store-client
- run: npx vercel build --prod
working-directory: ./packages/store-client
- run: npx vercel deploy --prod --prebuilt --token ${{ secrets.VERCEL_TOKEN }}
working-directory: ./packages/store-client
7 changes: 1 addition & 6 deletions packages/store-client/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
{
"name": "client",
"name": "@coldsurfers/store-client",
"version": "0.1.0",
"private": true,
"workspaces": {
"nohoist": [
"**"
]
},
"scripts": {
"dev": "next dev",
"build": "next build",
Expand Down

0 comments on commit 077304a

Please sign in to comment.