Skip to content
This repository was archived by the owner on Dec 7, 2025. It is now read-only.

build(deps): bump nanoid in the npm_and_yarn group across 1 directory… #27

build(deps): bump nanoid in the npm_and_yarn group across 1 directory…

build(deps): bump nanoid in the npm_and_yarn group across 1 directory… #27

name: Build and Push Docker Image
on:
push:
branches:
- main
release:
types: [published]
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ vars.DOCKERHUB_REPO }}
- name: Build and push Docker image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
file: ./Dockerfile
push: true
build-args: GITHUB_REF=${{ github.ref_name }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
- uses: shrink/actions-docker-extract@v3
id: extract
with:
image: ${{ vars.DOCKERHUB_REPO }}
path: /usr/share/nginx/html/.
destination: dist
- name: Upload static files as artifact
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: dist
# Deployment job
deploy:
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build-and-push
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4