File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,28 @@ import { WebflowClient } from "webflow-api";
6565
6666const webflow = new WebflowClient ({ accessToken });
6767
68- const site = await webflow .sites .get (" site-id" );
68+ // Env. variables
69+ // in format of string, e.g.: "639656400769508adc12fe42"
70+ const site_id = process .env .SITE_ID ;
71+ const custom_domain_id_1 = process .env .CUSTOM_DOMAIN_ID_1 ;
72+ const custom_domain_id_2 = process .env .CUSTOM_DOMAIN_ID_2 ;
73+
74+ // Sites
75+
76+ // List Sites
77+ const sites = await webflow .sites .list ();
78+
79+ // Get Site
80+ const site = await webflow .sites .get (" site_id" );
81+
82+ // Get Custom Domains
83+ const customDomains = await webflow .sites .getCustomDomain (site_id);
84+
85+ // Publish Site
86+ const site = await webflow .sites .publish (site_id, {
87+ customDomains: [custom_domain_id_1, custom_domain_id_2],
88+ publishToWebflowSubdomain: true ,
89+ });
6990```
7091
7192## OAuth
You can’t perform that action at this time.
0 commit comments