blog/.gitea/workflows/deployment.yaml
Workflow config file is invalid. Please check your config file: yaml: unmarshal errors: line 33: cannot unmarshal !!seq into string
SquidSpirit 35af8fd090
All checks were successful
Frontend CI / build (push) Successful in 1m27s
BLOG-9 Automatical deployment (#33)
### Description

- Create a Dockerfile to build the docker image.
- Set up the workflow to run deployment, which is to build and upload image to remote registry.
- Add a head meta html tag to show the version.

### Package Changes

_No response_

### Screenshots

_No response_

### Reference

Resolves #9

### Checklist

- [x] A milestone is set
- [x] The related issuse has been linked to this branch

Reviewed-on: #33
Reviewed-by: zoe <zoe@noreply.localhost>
Co-authored-by: SquidSpirit <squid@squidspirit.com>
Co-committed-by: SquidSpirit <squid@squidspirit.com>
2025-01-25 00:03:55 +08:00

35 lines
908 B
YAML

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 }}
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 }}