feat(ci): add CI/CD workflow and spec workflow setup
- Add Gitea workflow for build and deploy - Add spec workflow configuration and templates - Update package lock file for dependencies
This commit is contained in:
34
.gitea/workflows/deploy.yaml
Normal file
34
.gitea/workflows/deploy.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
name: Build and Deploy
|
||||
run-name: ${{ gitea.actor }} is building and deploying to Coolify 🚀
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKER_USERNAME }}/website-ricenoodletw-cms:latest
|
||||
|
||||
- name: Trigger Coolify Deployment
|
||||
run: |
|
||||
curl --request GET '${{ secrets.COOLIFY_WEBHOOK }}' --header 'Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}'
|
||||
Reference in New Issue
Block a user