No, because Pages uses Workers in the background and Workers only support JS, WASM, or anything that
No, because Pages uses Workers in the background and Workers only support JS, WASM, or anything that can be transpiled to JS or WASM (TS, Rust).
af9fabfdc3dcb4f21037c9edd9edac39CF_PAGES_COMMIT_SHA within a Vite React project? if so howsource:{} I want to know what I need to set for config to associate my pages project with my gitlab.com project"git_repo": {
gitlab_projectgroup1/group2/reponame


17:39:23.396 ✘ [ERROR] A request to the Cloudflare API (/accounts/af9fabfdc3dcb4f21037c9edd9edac39/workers/scripts/loveailand/versions) failed.
17:39:23.396
17:39:23.397 Uncaught Error: Disallowed operation called within global scope. Asynchronous I/O (ex: fetch() or connect()), setting a timeout, and generating random values are not allowed within global scope. To fix this error, perform this operation within a handler. https://developers.cloudflare.com/workers/runtime-apis/handlers/
17:39:23.397 at null.<anonymous> (server.js:86225:85)
17:39:23.397 [code: 10021] await import('wasm_exec.js')
const go = new Go();
const resp = await fetch(WASM_URL)
const bytes = await resp.arrayBuffer()
const res = await WebAssembly.instantiate(bytes, go.importObject)
const result = res.exports.NewFromJson(request.body) curl -s -X POST "$CF_API" \
-H "$CF_AUTH_HEADER" \
-H "Content-Type: application/json" \
--data-binary @- << EOF
{
"name": "$PROJECT_NAME",
"production_branch": "$BRANCH_NAME",
"build_config": {
"build_command": "$BUILD_COMMAND",
"destination_dir": "$BUILD_OUTPUT"
},
"source": {
"type": "git",
"config": {
"git_repo": {
"type": "gitlab",
"owner": "my-associated-owne",
"repo_name": "${CI_PROJECT_NAME}",
"gitlab_project": "${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}"
},
"production_branch": "$BRANCH_NAME"
}
}
}{
"result": null,
"success": false,
"errors": [
{
"code": 8000005,
"message": "Missing project source configuration. Specify a GitHub/GitLab repository owner and repository name."
}
],
"messages": []
} "source": {
"type": "git",
"config": {
"type": "gitlab",
"owner": "m",
"repo_name": "${CI_PROJECT_NAME}",
"gitlab_project": "${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}"
}, echo "🚀 Creating Cloudflare Pages project: $PROJECT_NAME"
curl -s -X POST "$CF_API" \
-H "$CF_AUTH_HEADER" \
-H "Content-Type: application/json" \
--data-binary @- << EOF
{
"name": "$PROJECT_NAME",
"production_branch": "$BRANCH_NAME",
"build_config": {
"build_command": "$BUILD_COMMAND",
"destination_dir": "$BUILD_OUTPUT"
},
"source": {
"type": "git",
"config": {
"type": "gitlab",
"owner": "myowner",
"repo_name": "${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}",
},
"production_branch": "$BRANCH_NAME"
}
}