kopia lustrzana https://github.com/cloudflare/wildebeest
deploy: fix
rodzic
6017d1c636
commit
1ae8b13d9c
|
@ -51,6 +51,7 @@ jobs:
|
||||||
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
run: terraform plan && terraform apply -auto-approve
|
run: terraform plan && terraform apply -auto-approve
|
||||||
|
continue-on-error: true
|
||||||
working-directory: ./tf
|
working-directory: ./tf
|
||||||
env:
|
env:
|
||||||
TF_VAR_cloudflare_account_id: ${{ secrets.CF_ACCOUNT_ID }}
|
TF_VAR_cloudflare_account_id: ${{ secrets.CF_ACCOUNT_ID }}
|
||||||
|
@ -64,7 +65,8 @@ jobs:
|
||||||
apiToken: ${{ secrets.CF_API_TOKEN }}
|
apiToken: ${{ secrets.CF_API_TOKEN }}
|
||||||
preCommands: |
|
preCommands: |
|
||||||
echo "*** pre commands ***"
|
echo "*** pre commands ***"
|
||||||
yarn
|
yarn build
|
||||||
|
cp -rv ./frontend/dist/* .
|
||||||
echo "******"
|
echo "******"
|
||||||
command: pages publish --project-name=wildebeest-${{ github.actor }} .
|
command: pages publish --project-name=wildebeest-${{ github.actor }} .
|
||||||
env:
|
env:
|
||||||
|
|
|
@ -37,7 +37,7 @@ resource "cloudflare_workers_kv_namespace" "wildebeest_cache" {
|
||||||
title = "wildebeest-cache"
|
title = "wildebeest-cache"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "random_string" "user_key" {
|
resource "random_password" "user_key" {
|
||||||
length = 256
|
length = 256
|
||||||
special = false
|
special = false
|
||||||
}
|
}
|
||||||
|
@ -46,10 +46,6 @@ resource "cloudflare_pages_project" "wildebeest_pages_project" {
|
||||||
account_id = var.cloudflare_account_id
|
account_id = var.cloudflare_account_id
|
||||||
name = "wildebeest-${var.gh_username}"
|
name = "wildebeest-${var.gh_username}"
|
||||||
production_branch = "main"
|
production_branch = "main"
|
||||||
build_config {
|
|
||||||
build_command = "yarn build"
|
|
||||||
destination_dir = "frontend/dist"
|
|
||||||
}
|
|
||||||
deployment_configs {
|
deployment_configs {
|
||||||
production {
|
production {
|
||||||
environment_variables = {
|
environment_variables = {
|
||||||
|
@ -57,7 +53,7 @@ resource "cloudflare_pages_project" "wildebeest_pages_project" {
|
||||||
CF_ACCOUNT_ID = ""
|
CF_ACCOUNT_ID = ""
|
||||||
CF_API_TOKEN = ""
|
CF_API_TOKEN = ""
|
||||||
|
|
||||||
USER_KEY = random_string.user_key.result
|
USER_KEY = random_password.user_key.result
|
||||||
}
|
}
|
||||||
kv_namespaces = {
|
kv_namespaces = {
|
||||||
KV_CACHE = cloudflare_workers_kv_namespace.wildebeest_cache.id
|
KV_CACHE = cloudflare_workers_kv_namespace.wildebeest_cache.id
|
||||||
|
|
Ładowanie…
Reference in New Issue