fix dep install #21
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: Build and Push Documentation Docker Image | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }}-docs | |
jobs: | |
check-changes: | |
runs-on: ubuntu-latest | |
outputs: | |
src: ${{ steps.changes.outputs.src }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Check if there are changes | |
uses: dorny/paths-filter@v3 | |
id: changes | |
with: | |
filters: | | |
src: | |
- 'apps/docs/**' | |
- 'packages/nuxt/**' | |
- 'packages/utils/**' | |
- 'bun.lockb' | |
build-and-push: | |
needs: check-changes | |
if: needs.check-changes.outputs.src == 'true' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=sha,format=long | |
type=raw,value=latest,enable={{is_default_branch}} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ./apps/docs/Dockerfile | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
build-args: | | |
TURBO_TEAM=${{ vars.TURBO_TEAM }} | |
TURBO_TOKEN=${{ secrets.TURBO_TOKEN }} |