From d4f68a1dffd83c33c77e91b2d2fcc1685efaaee3 Mon Sep 17 00:00:00 2001 From: goodroot <9484709+goodroot@users.noreply.github.com> Date: Thu, 21 Nov 2024 08:55:51 -0800 Subject: [PATCH] build then send via action --- .github/workflows/preview.yml | 22 ++++++++++++++++------ docusaurus.config.js | 3 +-- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 7fb9d3bf..69d2262c 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -13,13 +13,20 @@ jobs: - name: Checkout questdb.io repository uses: actions/checkout@v3 - - name: Debug - run: | - ls -la + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + cache: 'yarn' + + - name: Install dependencies + run: yarn install --frozen-lockfile - - name: "Install Netlify CLI if missing" - run: which netlify &> /dev/null || npm install netlify-cli -g - shell: bash + - name: Build site + env: + CONTEXT: deploy-preview + NETLIFY: true + run: yarn build - name: Deploy to Netlify uses: jsmrcaga/action-netlify-deploy@v2.0.0 @@ -27,6 +34,9 @@ jobs: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} build_directory: build + install_command: "echo Skipping installing the dependencies" + build_command: "echo Skipping building the web files" + deploy_alias: preview-${{ github.event.pull_request.number }} - name: "Update PR" if: ${{ env.NETLIFY_PREVIEW_URL }} diff --git a/docusaurus.config.js b/docusaurus.config.js index d19b4af6..edf9aca6 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -5,8 +5,7 @@ import dotenv from "dotenv" const ssrTemplate = require("./src/internals/ssr.template") const customFields = require("./src/config/customFields") const path = require("path") -const isPreviews = process.env.NETLIFY && process.env.IS_PREVIEW === 'true' - +const isPreviews = process.env.NETLIFY && process.env.CONTEXT === 'deploy-preview' dotenv.config()