diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 460e3a7..6b8abeb 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -39,17 +39,10 @@ jobs: - name: Deploy persistent production service if: gitea.event_name == 'workflow_dispatch' || (gitea.event_name == 'push' && gitea.ref == 'refs/heads/main') env: - STUDIO_USERNAME: studio - STUDIO_PASSWORD: ${{ secrets.STUDIO_PASSWORD }} DEPLOY_PORT: ${{ vars.DEPLOY_PORT }} RELEASE_SHA: ${{ gitea.sha }} run: | set -eu - if [ -z "$STUDIO_PASSWORD" ]; then - echo "STUDIO_PASSWORD repository secret is required for production deployment" - exit 1 - fi - if [ "$(id -u)" -eq 0 ]; then SUDO="" elif sudo -n true 2>/dev/null; then @@ -79,10 +72,7 @@ jobs: $SUDO chown -R root:root "$APP_ROOT" $SUDO chown -R "$SERVICE_USER:$SERVICE_USER" "$DATA_ROOT" $SUDO ln -sfn "$RELEASE_DIR" "$APP_ROOT/current" - - printf '%s' "$STUDIO_PASSWORD" | $SUDO tee /etc/rednote-tool-studio.password >/dev/null - $SUDO chown root:"$SERVICE_USER" /etc/rednote-tool-studio.password - $SUDO chmod 640 /etc/rednote-tool-studio.password + $SUDO rm -f /etc/rednote-tool-studio.password cat > rednote-tool-studio.service < 65535) throw new Error("DEPLOY_PORT must be a valid TCP port"); async function removeContainer(name) { @@ -98,7 +95,7 @@ try { next = await docker.createContainer({ name: candidate, Image: image, - Env: [`STUDIO_USERNAME=${username}`, `STUDIO_PASSWORD=${password}`, "NODE_ENV=production"], + Env: ["NODE_ENV=production"], ExposedPorts: { "3000/tcp": {} }, HostConfig: { RestartPolicy: { Name: "unless-stopped" },