Skip to content

ci & preview-deployments #13

ci & preview-deployments

ci & preview-deployments #13

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') }}
- 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') }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: "Installing lttle cli"
run: |
curl -fsSL https://raw.githubusercontent.com/lttle-cloud/ignition/refs/heads/master/get/lttle.sh | bash
- name: "Authenticating with eu.lttle.cloud"
env:
LTTLE_JWT_TOKEN: ${{ secrets.LTTLE_JWT_TOKEN }}
run: |
lttle login --api "http://eu.lttle.cloud:5100" "$LTTLE_JWT_TOKEN"\
- uses: actions/setup-node@v3
with:
node-version: 22.18.0
- name: "Setting up environment variables into .env.production file"
run: |
echo "TYPESENSE_API_KEY='$TYPESENSE_API_KEY'" >> .env.production
- run: ./deploy.sh