mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
feat(tf): gw2wiki
This commit is contained in:
parent
bf5b23f33f
commit
ec8a2ef686
2 changed files with 47 additions and 0 deletions
47
tf/cloudflare_pages_gw2wiki.tf
Normal file
47
tf/cloudflare_pages_gw2wiki.tf
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
resource "cloudflare_pages_project" "wiki" {
|
||||||
|
account_id = var.cloudflare_account_id
|
||||||
|
name = "gw2wiki"
|
||||||
|
production_branch = "v4"
|
||||||
|
|
||||||
|
source {
|
||||||
|
type = "github"
|
||||||
|
config {
|
||||||
|
owner = "gensokyo-zone"
|
||||||
|
repo_name = "gw2wiki"
|
||||||
|
production_branch = "v4"
|
||||||
|
deployments_enabled = true
|
||||||
|
pr_comments_enabled = false
|
||||||
|
production_deployment_enabled = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
build_config {
|
||||||
|
build_command = "npx quartz build"
|
||||||
|
destination_dir = "public"
|
||||||
|
root_dir = "/"
|
||||||
|
}
|
||||||
|
lifecycle {
|
||||||
|
ignore_changes = [
|
||||||
|
deployment_configs,
|
||||||
|
source
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "cloudflare_pages_domain" "wiki" {
|
||||||
|
account_id = var.cloudflare_account_id
|
||||||
|
project_name = "gw2wiki"
|
||||||
|
domain = "gw2.gensokyo.zone"
|
||||||
|
|
||||||
|
depends_on = [
|
||||||
|
cloudflare_pages_project.gw2wiki
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "cloudflare_record" "wiki" {
|
||||||
|
zone_id = cloudflare_zone.gensokyo-zone_zone.id
|
||||||
|
name = "gw2"
|
||||||
|
proxied = false
|
||||||
|
ttl = 3600
|
||||||
|
type = "CNAME"
|
||||||
|
value = cloudflare_pages_project.gw2wiki.subdomain
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue