This commit is contained in:
38
.gitea/workflows/deploy.yml
Normal file
38
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,38 @@
|
||||
name: Build and Deploy koneko.rocks
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Verify Docker access
|
||||
run: |
|
||||
echo "Checking Docker access from container..."
|
||||
docker version
|
||||
docker compose version
|
||||
|
||||
# use this as template if you need to build
|
||||
#- name: Build project
|
||||
# run: |
|
||||
# echo "Running build..."
|
||||
# ./build.sh
|
||||
|
||||
- name: Store artifact
|
||||
run: |
|
||||
echo "Storing artifact..."
|
||||
mkdir -p /opt/artifacts/koneko-static-site
|
||||
cp -r . /opt/artifacts/koneko-static-site/
|
||||
|
||||
- name: Deploy with Docker Compose
|
||||
run: |
|
||||
echo "Deploying with docker-compose..."
|
||||
cd /opt/artifacts/koneko-static-site
|
||||
docker compose down
|
||||
docker compose up -d --build
|
||||
|
Reference in New Issue
Block a user