user2500308
user2500308

Reputation: 69

How can I replace a stylesheet in a Divio Cloud project?

I successfully set up the Cloud project locally in Windows.

After having fixed the main.css for responsive behaviour, I need to copy this main.css back to the Cloud.

How can I deploy this in the Powershell? Is there a cp (copy) command? How do I copy to the correct file path in the Cloud?

Upvotes: 1

Views: 58

Answers (1)

Daniele Procida
Daniele Procida

Reputation: 1539

There are a number of steps involved in a simple CSS change such as this in a Divio Cloud project, and you've done several of them. They can all be done in the GUI Divio app, or using the Divio CLI.

You have already successfully done the following:

  • set up the project (Setup in the app)
  • run the project (Start)
  • make the changes

Now you need to push (upload) the code to the Cloud. In the Divio app, Upload code will perform that operation for you.

Divio app - Upload code

Related options

The Divio app also gives you the option to upload the media and database, but these are not affected by a change to your CSS, so you don't need to worry about those.

Upload media/database

What Upload code does

(Divio Cloud projects use Git to maintain the source code, so Upload code actually creates a new commit, and then a git push.)

Now your code changes are pushed to the Cloud, you can deploy the Test server, and when satisfied, deploy Live.

Why you can't copy your code

You asked about "copying" your changes. That would be possible with an old-style FTP server, with all the attendant risks, but nearly all modern deployment systems use version control for better management of source code.

"Copying" to a server is not possible with Git-based deployment systems, and the file path on the server is not actually relevant to code maintenance.

Upvotes: 1

Related Questions