Skip to content

Deploy Preview

Deploy Preview #3

Workflow file for this run

name: Deploy Preview
on:
workflow_dispatch:
jobs:
preview:
runs-on: ubicloud-standard-2
timeout-minutes: 120
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "20"
cache: "npm"
- run: npm ci
- name: Cache ngrok binary
id: cache-ngrok
uses: ubicloud/cache@v4
with:
path: /usr/local/bin/ngrok
key: ngrok-binary
- name: Install ngrok
if: steps.cache-ngrok.outputs.cache-hit != 'true'
run: curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null && echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | sudo tee /etc/apt/sources.list.d/ngrok.list && sudo apt update && sudo apt install ngrok
- name: Set ngrok token
run: ngrok config add-authtoken ${{ secrets.NGROK_TOKEN }}
- name: Local to public
run: ngrok http http://localhost:3000 --log ngrok.log > /dev/null &
- name: Preview URL
run: cat ngrok.log | grep "started tunnel" | sed 's/.*url=\(.*\)/\1/'
- name: Run Mintlify
run: npx mintlify dev --no-open