Skip to content

add content, optimize for light mode #38

add content, optimize for light mode

add content, optimize for light mode #38

Workflow file for this run

name: Docker CI
on:
push:
branches: ["main"]
tags: ["v*.*.*"]
pull_request:
branches: ["main"]
env:
REGISTRY: docker.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Create .env file
uses: SpicyPizza/[email protected]
with:
envkey_NEXT_PUBLIC_RESUME_URL: ${{ secrets.RESUME_URL }}
directory: .
file_name: .env.production
fail_on_empty: false
sort_keys: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
with:
context: .
file: ./Dockerfile.prod
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
deployment:
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy
if: ${{ github.event_name != 'pull_request' }}
uses: fjogeleit/http-request-action@v1
with:
url: ${{ secrets.DEPLOYMENT_URL }}
method: "GET"
timeout: 120000
bearerToken: ${{ secrets.DEPLOYMENT_TOKEN }}