Skip to content

Merge remote-tracking branch 'origin/main' #929

Merge remote-tracking branch 'origin/main'

Merge remote-tracking branch 'origin/main' #929

Workflow file for this run

name: Deploy Deep.Case App
on:
push:
branches: [ main ]
paths-ignore:
- '.github/test-build.yaml'
workflow_dispatch:
defaults:
run:
working-directory: ./
env:
NEXT_PUBLIC_ENGINES: 0
NEXT_PUBLIC_ENGINES_ROUTE: 1
NEXT_PUBLIC_DISABLE_CONNECTOR: 0
MIGRATIONS_ID_TYPE_SQL: bigint
MIGRATIONS_HASURA_PATH: host.docker.internal:8080
MIGRATIONS_HASURA_SSL: 0
MIGRATIONS_HASURA_SECRET: myadminsecretkey
NEXT_PUBLIC_DEEPLINKS_SERVER: http://localhost:3007
NEXT_PUBLIC_GQL_PATH: localhost:3006/gql
NEXT_PUBLIC_GQL_SSL: 0
DEEPLINKS_HASURA_PATH: host.docker.internal:8080
DEEPLINKS_HASURA_SSL: 0
MIGRATIONS_DEEPLINKS_URL: http://host.docker.internal:3006
DOCKER: 1
jobs:
dockerize:
name: dockerize
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Reconfigure git to use HTTP authentication
run: >
git config --global url."https://github.com/".insteadOf
ssh://git@github.com/
- uses: actions/setup-node@v1
with:
node-version: 18
- name: Configure Node caching
uses: actions/cache@v2
env:
cache-name: cache-node-modules-dockerize
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: install latest npm
run: npm i -g npm@latest
- name: ci
run: npm ci
# - name: pull dl
# run: cd node_modules/@deep-foundation && rm -rf deeplinks && git clone https://github.com/deep-foundation/deeplinks.git && cd deeplinks && npm ci && npm run package:build && rm -rf node_modules && rm -rf package-lock.json
# - name: pull hasura
# run: cd node_modules/@deep-foundation && rm -rf hasura && git clone https://github.com/deep-foundation/hasura.git && cd hasura && npm ci && npm run package:build && rm -rf node_modules && rm -rf package-lock.json
# - name: pull store
# run: cd node_modules/@deep-foundation && rm -rf store && git clone https://github.com/deep-foundation/store.git && cd store && npm ci && npm run package:build && rm -rf node_modules && rm -rf package-lock.json
- name: check envs
run: |
echo "DOCKER: $DOCKER"
echo "GITHUB_REPOSITORY: $GITHUB_REPOSITORY"
echo "NEXT_PUBLIC_EXPORT: $NEXT_PUBLIC_EXPORT"
echo "NEXT_PUBLIC_I18N_DISABLE: $NEXT_PUBLIC_I18N_DISABLE"
- name: build next
run: npm run build
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: deepf/deepcase
- name: build docker image and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}