Skip to content

ci & preview-deployments #3

ci & preview-deployments

ci & preview-deployments #3

Workflow file for this run

on:
push:
branches: ["main"]
paths-ignore:
- ".github/workflows/release.yml"
pull_request:
branches: ["main"]
workflow_call:
jobs:
preflight-checks:
uses: ./.github/workflows/checks.yaml
deploy:
needs: [preflight-checks]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
node_modules
key: dependencies-${{ hashFiles('package-lock.json') }}
restore-keys: |
dependencies-${{ hashFiles('package-lock.json') }}
- name: "Setting up dummy environment variables"
run: |
echo "DOCS_URL='http://example.com'" >> $GITHUB_ENV
echo "TYPESENSE_FQDN='https://typesense.example.com'" >> $GITHUB_ENV
echo "TYPESENSE_API_KEY='your-typesense-api-key'" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
path: |
build
key: build-${{ hashFiles('package-lock.json') }}-${{ github.ref }}
restore-keys: |
build-${{ hashFiles('package-lock.json') }}-${{ github.ref }}
build-${{ hashFiles('package-lock.json') }}
- uses: actions/setup-node@v3
with:
node-version: 22.18.0
- run: ./deploy.sh