Merge pull request #1 from Doble-Technologies/web-deploy
Create web-deploy.yml
This commit is contained in:
commit
9c990061f7
1 changed files with 42 additions and 0 deletions
42
.github/workflows/web-deploy.yml
vendored
Normal file
42
.github/workflows/web-deploy.yml
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
name: Web Deployment
|
||||||
|
on:
|
||||||
|
workflow_dispatch: {}
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- reopened
|
||||||
|
- synchronize
|
||||||
|
- ready_for_review
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- web/**
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
environment: dev
|
||||||
|
runs-on: ['self-hosted', 'pi']
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Login to Docker
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USER }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
- name: Build Image and Push to Registry
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile
|
||||||
|
platforms: linux/amd64
|
||||||
|
push: true
|
||||||
|
tags: user/app:latest
|
||||||
|
- name: Deploy to Coolify
|
||||||
|
run: |
|
||||||
|
curl --request GET '${{ secrets.COOLIFY_WEBHOOK }}' --header 'Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}'
|
||||||
|
|
||||||
Loading…
Reference in a new issue