Skip to content

Commit

Permalink
build then send via action
Browse files Browse the repository at this point in the history
  • Loading branch information
goodroot committed Nov 21, 2024
1 parent aee1573 commit d4f68a1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,30 @@ 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/[email protected]
with:
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 }}
Expand Down
3 changes: 1 addition & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit d4f68a1

Please sign in to comment.