[#374] changed BaseLayout to 90vh (#389) #186
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Ligretto build, push and deploy' | |
on: | |
push: | |
branches: [ master ] | |
paths-ignore: | |
- 'apps/gamehub-client/**' | |
- 'apps/blog/**' | |
- '.deploy' | |
- '!.deploy/ligretto.deploy.yml' | |
- '.docker' | |
- '!.docker/Ligretto*' | |
env: | |
AWS_REGION: 'eu-north-1' | |
jobs: | |
ligretto-frontend-build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.14' | |
cache: 'yarn' | |
- name: Install yarn | |
run: corepack enable | |
- name: Install dependencies | |
run: yarn | |
- name: Build frontend | |
run: yarn run ligretto:front:build | |
env: | |
LIGRETTO_GAMEPLAY_URL: https://api.ligretto.app | |
LIGRETTO_CORE_URL: https://core.ligretto.app/api | |
CAS_PARTNER_ID: 63b567bfd594b5085866649a | |
CAS_STATIC_URL: https://cas.mems.fun/static | |
CAS_URL: https://cas.mems.fun/api | |
AMPLITUDE_TOKEN: f55f6d07422dfb26ca4dfbe59a54d609 | |
- name: Archive frontend production dist | |
uses: actions/upload-artifact@v3 | |
with: | |
name: frontend-dist | |
path: | | |
apps/ligretto-frontend/dist | |
ligretto-gameplay-backend-image: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Docker Setup QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: 'arm64' | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
driver-opts: env.BUILDKIT_STEP_LOG_MAX_SIZE=10485760 | |
- name: Docker login | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v3 | |
with: | |
platforms: linux/arm64 | |
push: true | |
tags: | | |
ghcr.io/memebattle/ligretto-gameplay-backend:${{ github.sha }} | |
ghcr.io/memebattle/ligretto-gameplay-backend:latest | |
context: '.' | |
file: '.docker/Ligretto-gameplay-backend_Dockerfile' | |
cache-from: type=gha,scope=$GITHUB_REF_NAME-ligretto-gameplay-backend | |
cache-to: type=gha,mode=max,scope=$GITHUB_REF_NAME-ligretto-gameplay-backend | |
ligretto-core-backend-image: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Docker Setup QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: 'arm64' | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
driver-opts: env.BUILDKIT_STEP_LOG_MAX_SIZE=10485760 | |
- name: Docker login | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v3 | |
with: | |
platforms: linux/arm64 | |
push: true | |
tags: | | |
ghcr.io/memebattle/ligretto-core-backend:${{ github.sha }} | |
ghcr.io/memebattle/ligretto-core-backend:latest | |
context: '.' | |
file: '.docker/Ligretto-core-backend_Dockerfile' | |
cache-from: type=gha,scope=$GITHUB_REF_NAME-ligretto-core-backend | |
cache-to: type=gha,mode=max,scope=$GITHUB_REF_NAME-ligretto-core-backend | |
deploy: | |
needs: [ligretto-gameplay-backend-image, ligretto-core-backend-image, ligretto-frontend-build] | |
runs-on: ubuntu-20.04 | |
environment: | |
name: Ligretto-production | |
url: https://ligretto.app | |
steps: | |
- uses: actions/checkout@v3 | |
name: Checkout | |
- name: Download frontend dist | |
id: download_frontend_dist | |
uses: actions/download-artifact@v3 | |
with: | |
name: frontend-dist | |
path: apps/ligretto-frontend/dist | |
- uses: ./.github/actions/deploy-to-swarm | |
name: Deploy to swarm lambda | |
with: | |
path-to-stack: '.deploy/ligretto.deploy.yml' | |
name: 'LIGRETTO' | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
docker_login: ${{ secrets.GHCR_USER }} | |
docker_password: ${{ secrets.GHCR_PULL_TOKEN }} | |
docker_registry: 'ghcr.io' | |
- uses: ./.github/actions/deploy-to-s3 | |
name: Deploy to s3 | |
with: | |
path-to-folder: apps/ligretto-frontend/dist | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
bucket: 'lig-production-cdn-origin' | |
backup-bucket: 'lig-production-cdn-backup' | |