mirror of
https://github.com/lorsanstand/Aether.git
synced 2026-06-19 12:05:16 +03:00
35 lines
599 B
YAML
35 lines
599 B
YAML
name: Deploy to Server
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: self-hosted
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Create .env file
|
|
run: |
|
|
echo "${{ secrets.ENV_FILE }}" > .env
|
|
|
|
- name: Build
|
|
run: |
|
|
echo "Building to server"
|
|
docker compose build
|
|
|
|
- name: Deploying
|
|
run: |
|
|
echo "Deploying to server"
|
|
docker compose up -d
|
|
|
|
- name: Cleanup old images
|
|
run: |
|
|
docker image prune -f
|
|
|