BLOG-9 Automatical deployment #33
34
.gitea/workflows/deployment.yaml
Normal file
34
.gitea/workflows/deployment.yaml
Normal file
@ -0,0 +1,34 @@
|
||||
name: Deployment
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
|
||||
jobs:
|
||||
frontend-deployment:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build image and push to registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ vars.REGISTRY}}
|
||||
zoe marked this conversation as resolved
Outdated
|
||||
username: ${{ vars.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
context: ./frontend
|
||||
tags:
|
||||
- ${{ vars.REGISTRY }}/${{ vars.IMAGE_REPO_FRONTEND }}:latest
|
||||
- ${{ vars.REGISTRY }}/${{ vars.IMAGE_REPO_FRONTEND }}:${{ gitea.event.release.tag_name }}
|
@ -15,11 +15,6 @@ COPY . .
|
||||
RUN corepack enable pnpm && \
|
||||
pnpm run build
|
||||
|
||||
FROM builder
|
||||
WORKDIR /app
|
||||
RUN apk add --no-cache tree && \
|
||||
tree -L 3
|
||||
|
||||
FROM base AS runner
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
|
Loading…
x
Reference in New Issue
Block a user
Missing a space
Addressed in
290050700d