diff --git a/.github/workflows/deploy-store-preview.yml b/.github/workflows/deploy-store-preview.yml new file mode 100644 index 0000000..c30a147 --- /dev/null +++ b/.github/workflows/deploy-store-preview.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/deploy-store-production.yml b/.github/workflows/deploy-store-production.yml new file mode 100644 index 0000000..60b8068 --- /dev/null +++ b/.github/workflows/deploy-store-production.yml @@ -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 \ No newline at end of file diff --git a/packages/store-client/package.json b/packages/store-client/package.json index 3a60ad7..c3c7ad8 100644 --- a/packages/store-client/package.json +++ b/packages/store-client/package.json @@ -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",