.PHONY: help full-deploy full-destroy provision configure test

help:
	@echo "Qvest Task - Gitea Deployment"
	@echo ""
	@echo "Targets:"
	@echo "  full-deploy     - Full deployment (terraform + ansible)"
	@echo "  full-destroy    - Destroy all infrastructure"
	@echo "  provision - Provision AWS infrastructure only"
	@echo "  configure       - Run ansible configuration only"
	@echo "  test            - Run integration tests"

provision:
	cd terraform && terraform apply -auto-approve

configure:
	cd ansible && ansible-playbook -i inventory site.yml

test:
	./scripts/test-update.sh

full-deploy: provision configure
	@echo "Deployment complete. Gitea available at https://git.poll-streams.com"

full-destroy:
	@./scripts/empty-s3-bucket.sh
	cd terraform && terraform destroy -auto-approve
