diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..99fecee --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,21 @@ +name: Deploy ACT Runner Installer + +on: + push: + branches: [main] + workflow_dispatch: + +jobs: + deploy: + runs-on: debian-12-host + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup and deploy + run: | + mkdir -p ${{ env.HOME }}/${{ gitea.repository }} + cp -r . ${{ env.HOME }}/${{ gitea.repository }} + cd ${{ env.HOME }}/${{ gitea.repository }} + docker compose down --remove-orphans + docker compose up -d --build --force-recreate diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..7a0e05a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,14 @@ +version: "3.9" + +services: + installer: + image: nginx:alpine + container_name: act-runner-installer + restart: unless-stopped + ports: + - "${PORT:-1234}:80" + volumes: + - ./install.sh:/usr/share/nginx/html/install.sh:ro + # Optional: expose README too + - ./README.md:/usr/share/nginx/html/README.md:ro + - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..1c78ed1 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,20 @@ +server { + listen 80; + server_name _; + + root /usr/share/nginx/html; + index install.sh; + + # Serve the installer at the root path + location = / { + try_files /install.sh =404; + default_type text/plain; + } + + # Ensure install.sh is served as text + location = /install.sh { + default_type text/plain; + } +} + +