Upload Draft to Webserver

Is there an action to upload a draft to my own webserver? (Wrap draft in html and upload).

A few people mentioned using an action together with Shortcuts. Not sure how that works and it is now 2.5 years ago. What are the current options?

Old topic thread below.

How would you normally add an HTML file to your web server? Would it be (S)FTP, a file share, a git repo, Webdav, upload via a CMS?

The options your server offers can affect what approach can be taken.

If a file share, this should be possible natively I think.

If SFTP, you could automate via Secure Shellfish for example.

If Git, you,might automate via Working Copy, or using my own Drafts helper functions for Github.

If WebDAV is a native action step.

A CMS could work if it also has an API. E.g. WordPress, though there happens to be native support for this anyway.

1 Like

I use SFTP. Secure Shellfish is probably a brilliant app (I have Ander’s Working Copy app), but a bit pricey for my light use. Is there another SFTP/SSH option that integrates with Drafts?

You can push content via SSH using Shortcuts. Ari Weinstein, one of the original Workflow team (which became Shortcuts) demoed it once on Twitter. More recently, but still several years ago, it came up on the Automators forum too.

Chances are that you will be able to send the data from Drafts to a Shortcuts shortcut set up in a similar way to that described in the thread without too much trouble.

I got in on Secure Shellfish on the release price, and I guess it was at a much lower pricce having looked at the lifetime unlock.

1 Like

Thanks @sylumer. Wow! This works. I have wanted to do this with Drafts for so long. The SSH Shortcuts action means Drafts can generate a webpage from markdown and upload it to a web server via Shortcuts.

I’ve created an action that wraps the draft in HTML, prepends/appends the webpage header and footer, prompts for a file name, and uploads the draft to the web server.

1 Like