File tree Expand file tree Collapse file tree 3 files changed +29
-7
lines changed
src/OpenSourceTest.MyExtension Expand file tree Collapse file tree 3 files changed +29
-7
lines changed Original file line number Diff line number Diff line change 88 workflow_dispatch : # Allow manual triggering of the workflow
99
1010jobs :
11-
12- # Intentionally NOT syncing from Cloud as all patches/updates etc being done manually on GitHub repo
13-
1411 # Package and Deploy to Umbraco Cloud (without saving the artifact as contains sensitive data)
1512 cloud-deployment :
1613 name : " Deploy to Cloud"
2320 formsLicenseKey : ${{ secrets.FORMS_LICENSE_KEY }}
2421 with :
2522 pathToWebsite : " src/OpenSourceTest.Site"
26- csprojFile : " OpenSourceTest.Site.csproj"
23+ csprojFile : " OpenSourceTest.Site.csproj"
24+ pathToFrontendClient : " src/OpenSourceTest.MyExtension/Client"
Original file line number Diff line number Diff line change 99 csprojFile :
1010 required : true
1111 type : string
12+ pathToFrontendClient :
13+ required : true
14+ type : string
1215
1316 secrets :
1417 projectId :
7477 run : cp cloud.gitignore .gitignore
7578 shell : bash
7679
80+ # Setup Node.js for frontend build
81+ - name : Setup Node.js
82+ uses : actions/setup-node@v4
83+ with :
84+ node-version : ' 22.x'
85+ cache : ' npm'
86+ cache-dependency-path : ' ${{ inputs.pathToFrontendClient }}/package-lock.json'
87+
88+ # build the frontend assets
89+ - name : Build frontend assets
90+ working-directory : ${{ inputs.pathToFrontendClient }}
91+ run : npm ci && npm run build --if-present
92+ shell : bash
93+
7794 # zip everything, except what is defined in the 'cloud.zipignore'
7895 - name : Zip Source Code
7996 run : zip -r sources.zip . -x@cloud.zipignore
Original file line number Diff line number Diff line change 3434 <Folder Include =" wwwroot\" />
3535 </ItemGroup >
3636
37- <!-- Restore and build Client files -->
38- <Target Name =" RestoreClient" Inputs =" Client\package.json;Client\package-lock.json" Outputs =" Client\node_modules\.package-lock.json" >
37+ <!-- Restore and build Client files outside of Cloud environments -->
38+ <Target Name =" RestoreClient"
39+ Inputs =" Client\package.json;Client\package-lock.json"
40+ Outputs =" Client\node_modules\.package-lock.json" >
3941 <Message Importance =" high" Text =" Restoring Client NPM packages..." />
4042 <Exec Command =" npm i" WorkingDirectory =" Client" />
4143 </Target >
4244
43- <Target Name =" BuildClient" BeforeTargets =" AssignTargetPaths" DependsOnTargets =" RestoreClient" Inputs =" @(ClientAssetsInputs)" Outputs =" $(IntermediateOutputPath)client.complete.txt" >
45+ <Target Name =" BuildClient"
46+ BeforeTargets =" AssignTargetPaths"
47+ DependsOnTargets =" RestoreClient"
48+ Inputs =" @(ClientAssetsInputs)"
49+ Outputs =" $(IntermediateOutputPath)client.complete.txt"
50+ Condition =" !('$(UMBRACO__CLOUD__ISRUNNINGONCLOUD)' == 'true' OR '$(ENVIRONMENT__PROJECTID)' != '')" >
4451 <Message Importance =" high" Text =" Executing Client NPM build script..." />
4552 <Exec Command =" npm run build" WorkingDirectory =" Client" />
4653 <ItemGroup >
You can’t perform that action at this time.
0 commit comments