mirror of
https://github.com/lorsanstand/Aether.git
synced 2026-06-19 12:05:16 +03:00
37 lines
629 B
YAML
37 lines
629 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: |
|
|
cat << 'EOF' > .env
|
|
${{ secrets.ENV_FILE }}
|
|
EOF
|
|
|
|
- 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
|
|
|