Skip to content

Deploy

Deploy #46

Workflow file for this run

name: Deploy
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
# Login
- name: Login to Docker registry
uses: docker/login-action@v1
with:
registry: 891459268445.dkr.ecr.eu-north-1.amazonaws.com/gradestats-web-prd
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Image to ECR
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: 891459268445.dkr.ecr.eu-north-1.amazonaws.com/gradestats-web-prd:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
build-args: NEXT_PUBLIC_BUILD_TIME_COURSE_LIMIT,NEXT_PUBLIC_GRADES_API_URL,NEXT_PUBLIC_CANONICAL_URL,NEXT_PUBLIC_SENTRY_DSN,NEXT_PUBLIC_GA_TRACKING_ID,NEXT_PUBLIC_FEIDE_CLIENT_ID,NEXT_PUBLIC_FEIDE_AUTH_ENDPOINT
env:
NEXT_PUBLIC_BUILD_TIME_COURSE_LIMIT: ${{ secrets.NEXT_PUBLIC_BUILD_TIME_COURSE_LIMIT }}
NEXT_PUBLIC_GRADES_API_URL: ${{ secrets.NEXT_PUBLIC_GRADES_API_URL }}
NEXT_PUBLIC_CANONICAL_URL: ${{ secrets.NEXT_PUBLIC_CANONICAL_URL }}
NEXT_PUBLIC_SENTRY_DSN: ${{ secrets.NEXT_PUBLIC_SENTRY_DSN }}
NEXT_PUBLIC_GA_TRACKING_ID: ${{ secrets.NEXT_PUBLIC_GA_TRACKING_ID }}
NEXT_PUBLIC_FEIDE_CLIENT_ID: ${{ secrets.NEXT_PUBLIC_FEIDE_CLIENT_ID }}
NEXT_PUBLIC_FEIDE_AUTH_ENDPOINT: ${{ secrets.NEXT_PUBLIC_FEIDE_AUTH_ENDPOINT }}