Migrate from GitHub to Gitea with CI/CD
Some checks failed
Deploy / deploy (push) Failing after 6m11s

- Add Gitea Actions workflow for automated frontend and API deployment
- Update all raw download URLs from GitHub to Gitea
- Remove deprecated Amplify config and GitHub-specific Terraform variables
- Clean up commented-out Amplify resources from Terraform
- Update documentation to reflect new repository and CI/CD setup
This commit is contained in:
DaX
2026-02-16 00:35:08 +01:00
parent b7f5417e23
commit 58c165749d
8 changed files with 190 additions and 167 deletions

View File

@@ -20,98 +20,5 @@ provider "cloudflare" {
api_token = var.cloudflare_api_token != "" ? var.cloudflare_api_token : "dummy" # Dummy token if not provided
}
# ===== DEPRECATED: Amplify Hosting (Migrated to CloudFront + S3) =====
# Amplify app was deleted due to broken GitHub integration
# Frontend now hosted on CloudFront + S3 (see cloudfront-frontend.tf)
# Kept here for reference only
#
# resource "aws_amplify_app" "filamenteka" {
# name = "filamenteka"
# repository = var.github_repository
# platform = "WEB"
#
# build_spec = <<-EOT
# version: 1
# frontend:
# phases:
# preBuild:
# commands:
# - npm ci
# - npm run security:check
# build:
# commands:
# - npm run build
# - npm run test
# artifacts:
# baseDirectory: .next
# files:
# - '**/*'
# cache:
# paths:
# - node_modules/**/*
# - .next/cache/**/*
# EOT
#
# environment_variables = {
# NEXT_PUBLIC_API_URL = "https://api.filamenteka.rs/api"
# }
#
# custom_rule {
# source = "/<*>"
# status = "404"
# target = "/index.html"
# }
#
# enable_branch_auto_build = true
#
# tags = {
# Name = "Filamenteka"
# Environment = var.environment
# "amplify:github_app_migration" = "opted_out"
# }
# }
#
# resource "aws_amplify_branch" "main" {
# app_id = aws_amplify_app.filamenteka.id
# branch_name = "main"
# enable_auto_build = true
# environment_variables = {}
# stage = "PRODUCTION"
# tags = {
# Name = "Filamenteka-main"
# Environment = var.environment
# }
# }
#
# resource "aws_amplify_branch" "dev" {
# app_id = aws_amplify_app.filamenteka.id
# branch_name = "dev"
# enable_auto_build = true
# stage = "DEVELOPMENT"
# tags = {
# Name = "Filamenteka-dev"
# Environment = "development"
# }
# }
#
# resource "aws_amplify_domain_association" "filamenteka" {
# count = var.domain_name != "" ? 1 : 0
# app_id = aws_amplify_app.filamenteka.id
# domain_name = var.domain_name
# wait_for_verification = false
#
# sub_domain {
# branch_name = aws_amplify_branch.main.branch_name
# prefix = ""
# }
#
# sub_domain {
# branch_name = aws_amplify_branch.main.branch_name
# prefix = "www"
# }
#
# sub_domain {
# branch_name = aws_amplify_branch.dev.branch_name
# prefix = "dev"
# }
# }
# Frontend hosted on CloudFront + S3 (see cloudfront-frontend.tf)
# CI/CD handled by Gitea Actions (see .gitea/workflows/deploy.yml)

View File

@@ -1,11 +1,7 @@
# Copy this file to terraform.tfvars and fill in your values
# GitHub repository for Amplify
github_repository = "https://github.com/yourusername/filamenteka"
github_token = "ghp_your_github_token_here"
# Domain configuration
domain_name = "filamenteka.yourdomain.com"
# Cloudflare configuration (optional)
cloudflare_api_token = "your-cloudflare-api-token"
cloudflare_api_token = "your-cloudflare-api-token"

View File

@@ -1,14 +1,3 @@
variable "github_repository" {
description = "GitHub repository URL"
type = string
}
variable "github_token" {
description = "GitHub personal access token for Amplify"
type = string
sensitive = true
}
variable "domain_name" {
description = "Custom domain name (optional)"
type = string