Skip to content

Commit cf5ebd2

Browse files
authored
docs: improve getting started & deploying section (#2060)
remove outdated images remove H1 polish prose update structure & formatting use admonitions instead of block quotes <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Polishes Academy getting started/deploying docs with admonitions and wording updates, replaces playbook links with a marketing checklist, removes the playbook index, and adds an Nginx redirect. > > - **Academy docs**: > - **Getting started & Deploying**: Streamline titles/descriptions, normalize headings, and replace block quotes with admonitions across `getting_started/*` and `deploying_your_code/*` (inputs/outputs, input schema, Dockerfile, deploying). > - **Content tweaks**: Minor prose polish, clarified sections (e.g., “Actorization” workflow), and updated examples/notes. > - **Link updates**: Replace references to `actor-marketing-playbook` with `Marketing checklist` paths. > - **Marketing playbook**: > - Remove `sources/academy/platform/get_most_of_actors/index.md` (index page). > - **Platform docs**: > - Update mentions/links to marketing checklist in monetization and store pages. > - **Nginx**: > - Add redirect from `'/academy/actor-marketing-playbook'` to ``/academy/actor-marketing-playbook/promote-your-actor/checklist``. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit e50c772. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 3c92b64 commit cf5ebd2

File tree

18 files changed

+156
-248
lines changed

18 files changed

+156
-248
lines changed

nginx.conf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -643,8 +643,9 @@ server {
643643
rewrite ^/api/v2-old(.*)$ /api/v2$1 permanent;
644644
rewrite ^/api/v2-redoc(.*)$ /api/v2$1 permanent;
645645

646-
# Actor marketing playbook addition
647-
rewrite ^/academy/get-most-of-actors$ /academy/actor-marketing-playbook permanent;
646+
# Actor marketing playbook redirects (index page removed)
647+
rewrite ^/academy/get-most-of-actors$ /academy/actor-marketing-playbook/promote-your-actor/checklist permanent;
648+
rewrite ^/academy/actor-marketing-playbook$ /academy/actor-marketing-playbook/promote-your-actor/checklist permanent;
648649

649650
# Misc
650651
rewrite ^/platform/integrations/llama$ /platform/integrations/llama-index permanent;

sources/academy/build-and-publish/how-to-build/actorization_playbook.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,4 @@ Deployment to Apify platform can be done easily via `apify push` command of [Api
135135

136136
### 6. Publish and monetize
137137

138-
For details on publishing the Actor in [Apify Store](https://apify.com/store) see the [Publishing and monetization](/platform/actors/publishing). You can also follow our guide on [How to create an Actor README](/academy/actor-marketing-playbook/actor-basics/how-to-create-an-actor-readme) and [Actor marketing playbook](/academy/actor-marketing-playbook).
138+
For details on publishing the Actor in [Apify Store](https://apify.com/store) see the [Publishing and monetization](/platform/actors/publishing). You can also follow our guide on [How to create an Actor README](/academy/actor-marketing-playbook/actor-basics/how-to-create-an-actor-readme) and [Marketing checklist](/academy/actor-marketing-playbook/promote-your-actor/checklist).

sources/academy/platform/apify_platform.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ category: apify platform
66
slug: /apify-platform
77
---
88

9-
# Introduction to the Apify platform {#about-the-platform}
10-
119
**Learn all about the Apify platform, all of the tools it offers, and how it can improve your overall development experience.**
1210

1311
---

sources/academy/platform/deploying_your_code/deploying.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
title: Publishing your Actor
3-
description: Push local code to the platform, or create a new Actor on the console and integrate it with a Git repository to optionally automatically rebuild any new changes.
3+
description: Push local code to the platform, or create an Actor and integrate it with a Git repository for automatic rebuilds.
44
sidebar_position: 5
55
slug: /deploying-your-code/deploying
66
---
77

8-
**Push local code to the platform, or create a new Actor on the console and integrate it with a Git repository to optionally automatically rebuild any new changes.**
8+
**Push local code to the platform, or create an Actor and integrate it with a Git repository for automatic rebuilds.**
99

1010
---
1111

@@ -15,7 +15,11 @@ Once you've **actorified** your code, there are two ways to deploy it to the Api
1515

1616
Before we deploy our project onto the Apify platform, let's ensure that we've pushed the changes we made in the last 3 lessons into our remote GitHub repository.
1717

18-
> The benefit of using this method is that any time you push to the Git repository, the code on the platform is also updated and the Actor is automatically rebuilt. Also, you don't have to use a GitHub repository - you can use GitLab or any other service you'd like.
18+
:::tip Git integration
19+
20+
The benefit of using this method is that any time you push to the Git repository, the code on the platform is also updated and the Actor is automatically rebuilt. Also, you don't have to use a GitHub repository - you can use GitLab or any other service you'd like.
21+
22+
:::
1923

2024
### Creating the Actor
2125

@@ -45,13 +49,21 @@ That's it! The Actor should now pull its source code from the repository and aut
4549

4650
## Without a GitHub repository (using the Apify CLI) {#with-apify-cli}
4751

48-
> If you don't yet have the Apify CLI, learn how to install it and log in by following along with [this brief lesson](../../glossary/tools/apify_cli.md) about it.
52+
:::info CLI prerequisite
53+
54+
If you don't yet have the Apify CLI, learn how to install it and log in by following along with [this brief lesson](../../glossary/tools/apify_cli.md) about it.
55+
56+
:::
4957

5058
If you're logged in to the Apify CLI, the `apify push` command can be used to push the code straight onto the Apify platform from your local machine (no GitHub repository required), where it will automatically be built for you. Prior to running this command, make sure that you have an **.actor/actor.json** file at the root of the project. If you don't already have one, you can use `apify init .` to automatically generate one for you.
5159

52-
One important thing to note is that you can use a `.gitignore` file to exclude files from being pushed. When you use `apify push` without a `.gitignore`, the full folder contents will be pushed, meaning that even the **storage** and **node_modules** will be pushed. These files are unnecessary to push, as they are both generated on the platform.
60+
One important thing to note is that you can use a `.gitignore` file to exclude files from being pushed. When you use `apify push` without a `.gitignore`, the full folder contents will be pushed, meaning that even the `storage` and `node_modules` will be pushed. These files are unnecessary to push, as they are both generated on the platform.
61+
62+
:::caution Development only
63+
64+
The `apify push` command should only really be used for quickly pushing and testing Actors on the platform during development. If you are ready to make your Actor public, use a Git repository instead, as you will reap the benefits of using Git and others will be able to contribute to the project.
5365

54-
> The `apify push` command should only really be used for quickly pushing and testing Actors on the platform during development. If you are ready to make your Actor public, use a Git repository instead, as you will reap the benefits of using Git and others will be able to contribute to the project.
66+
:::
5567

5668
## Deployed! {#deployed}
5769

sources/academy/platform/deploying_your_code/docker_file.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,34 @@
11
---
22
title: Creating Actor Dockerfile
3-
description: Understand how to write a Dockerfile (Docker image blueprint) for your project so that it can be run within a Docker container on the Apify platform.
3+
description: Learn to write a Dockerfile for your project so it can run in a Docker container on the Apify platform.
44
sidebar_position: 4
55
slug: /deploying-your-code/docker-file
66
---
77

88
import Tabs from '@theme/Tabs';
99
import TabItem from '@theme/TabItem';
1010

11-
**Understand how to write a Dockerfile (Docker image blueprint) for your project so that it can be run within a Docker container on the Apify platform.**
11+
**Learn to write a Dockerfile for your project so it can run in a Docker container on the Apify platform.**
1212

1313
---
1414

1515
The **Dockerfile** is a file which gives the Apify platform (or Docker, more specifically) instructions on how to create an environment for your code to run in. Every Actor must have a Dockerfile, as Actors run in Docker containers.
1616

17-
> Actors on the platform are always run in Docker containers; however, they can also be run in local Docker containers. This is not common practice though, as it requires more setup and a deeper understanding of Docker. For testing, it's best to run the Actor on the local OS (this requires you to have the underlying runtime installed, such as Node.js, Python, Rust, GO, etc).
17+
:::note Local testing
18+
19+
Actors on the platform are always run in Docker containers, however, they can also be run in local Docker containers. This is not common practice though, as it requires more setup and a deeper understanding of Docker. For testing, it's best to run the Actor on the local OS (this requires you to have the underlying runtime installed, such as Node.js, Python, Rust, GO, etc).
20+
21+
:::
1822

1923
## Base images {#base-images}
2024

21-
If your project doesn’t already contain a Dockerfile, don’t worry! Apify offers [many base images](/sdk/js/docs/guides/docker-images) that are optimized for building and running Actors on the platform, which can be found on [Docker Hub](https://hub.docker.com/u/apify). When using a language for which Apify doesn't provide a base image, [Docker Hub](https://hub.docker.com/) provides a ton of free Docker images for most use-cases, upon which you can create your own images.
25+
If your project doesn't already contain a Dockerfile, don't worry! Apify offers [many base images](/sdk/js/docs/guides/docker-images) that are optimized for building and running Actors on the platform, which can be found on [Docker Hub](https://hub.docker.com/u/apify). When using a language for which Apify doesn't provide a base image, [Docker Hub](https://hub.docker.com/) provides a ton of free Docker images for most use-cases, upon which you can create your own images.
26+
27+
:::tip DockerHub images
28+
29+
You can see all of Apify's Docker images [on DockerHub](https://hub.docker.com/u/apify).
2230

23-
> Tip: You can see all of Apify's Docker images [on DockerHub](https://hub.docker.com/u/apify).
31+
:::
2432

2533
At the base level, each Docker image contains a base operating system and usually also a programming language runtime (such as Node.js or Python). You can also find images with preinstalled libraries or install them yourself during the build step.
2634

@@ -30,13 +38,21 @@ Once you find the base image you need, you can add it as the initial `FROM` stat
3038
FROM apify/actor-node:16
3139
```
3240

33-
> For syntax highlighting in your Dockerfiles, download the [**Docker** VSCode extension](https://code.visualstudio.com/docs/containers/overview#_installation).
41+
:::tip VSCode extension
42+
43+
For syntax highlighting in your Dockerfiles, download the [Docker VSCode extension](https://code.visualstudio.com/docs/containers/overview#_installation).
44+
45+
:::
3446

3547
## Writing the file {#writing-the-file}
3648

3749
The rest of the Dockerfile is about copying the source code from the local filesystem into the container's filesystem, installing libraries, and setting the `RUN` command (which falls back to the parent image).
3850

39-
> If you are not using a base image from Apify, then you should specify how to launch the source code of your Actor with the `CMD` instruction.
51+
:::info Custom images
52+
53+
If you are not using a base image from Apify, then you should specify how to launch the source code of your Actor with the `CMD` instruction.
54+
55+
:::
4056

4157
Here's the Dockerfile for our Node.js example project's Actor:
4258

sources/academy/platform/deploying_your_code/index.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,13 @@ slug: /deploying-your-code
99
import Tabs from '@theme/Tabs';
1010
import TabItem from '@theme/TabItem';
1111

12-
# Deploying your code to Apify {#deploying}
13-
1412
**In this course learn how to take an existing project of yours and deploy it to the Apify platform as an Actor.**
1513

1614
---
1715

18-
This section will discuss how to use your newfound knowledge of the Apify platform and Actors from the [**Getting started**](../getting_started/index.md) section to deploy your existing project's code to the Apify platform as an Actor.
16+
This section discusses how to use your newfound knowledge of the Apify platform and Actors from the [**Getting started**](../getting_started/index.md) section to deploy your existing project's code to the Apify platform as an Actor.
1917
Any program running in a Docker container can become an Apify Actor.
2018

21-
![The deployment workflow](../../images/deployment-workflow.png)
22-
2319
Apify provides detailed guidance on how to deploy Node.js and Python programs as Actors, but apart from that you're not limited in what programming language you choose for your scraper.
2420

2521
![Supported languages](../../images/supported-languages.jpg)
@@ -30,12 +26,12 @@ Here are a few examples of Actors in other languages:
3026
- [Go Actor](https://apify.com/jirimoravcik/go-actor-example)
3127
- [Julia Actor](https://apify.com/jirimoravcik/julia-actor-example)
3228

33-
## The "actorification" workflow {#workflow}
29+
## The "Actorization" workflow {#workflow}
3430

3531
Follow these four main steps to turn a piece of code into an Actor:
3632

3733
1. Handle [accepting inputs and writing outputs](./inputs_outputs.md).
38-
2. Create an [input schema](./input_schema.md) **(optional)**.
34+
2. Create an [input schema](./input_schema.md) _(optional)_.
3935
3. Add a [Dockerfile](./docker_file.md).
4036
4. [Deploy](./deploying.md) to the Apify platform!
4137

@@ -73,10 +69,14 @@ print(add_all_numbers([1, 2, 3, 4])) # -> 10
7369
</TabItem>
7470
</Tabs>
7571

76-
> For all lessons in this section, we'll have examples for both Node.js and Python so that you can follow along in either language.
72+
:::note Language examples
73+
74+
For all lessons in this section, we'll have examples for both Node.js and Python so that you can follow along in either language.
75+
76+
:::
7777

7878
<!-- We've pushed this code to GitHub and are ready to turn it into an Actor that takes any number of integers as input, adds them all up, then stores the solution as its output. -->
7979

80-
## Next up {#next}
80+
## Next up
8181

8282
[Next lesson](./inputs_outputs.md), we'll be learning how to accept input into our Actor as well as deliver output.

sources/academy/platform/deploying_your_code/input_schema.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ slug: /deploying-your-code/input-schema
99

1010
---
1111

12-
Though writing an [input schema](/platform/actors/development/actor-definition/input-schema) for an Actor is not a required step, it is most definitely an ideal one. The Apify platform will read the **INPUT_SCHEMA.json** file within the root of your project and generate a user interface for entering input into your Actor, which makes it significantly easier for non-developers (and even developers) to configure and understand the inputs your Actor can receive. Because of this, we'll be writing an input schema for our example Actor.
12+
Though writing an [input schema](/platform/actors/development/actor-definition/input-schema) for an Actor is not a required step, it's definitely an ideal one. The Apify platform will read the `INPUT_SCHEMA.json` file within the root of your project and generate a user interface for entering input into your Actor, which makes it significantly easier for non-developers (and even developers) to configure and understand the inputs your Actor can receive. Because of this, we'll be writing an input schema for our example Actor.
1313

14-
> Without an input schema, the users of our Actor will have to provide the input in JSON format, which can be problematic for those who are not familiar with JSON.
14+
:::note JSON requirement
15+
16+
Without an input schema, the users of our Actor will have to provide the input in JSON format, which can be problematic for those who are not familiar with JSON.
17+
18+
:::
1519

1620
## Schema title & description {#title-and-description}
1721

@@ -100,7 +104,7 @@ Here is what the input schema we wrote will render on the platform:
100104

101105
![Rendered UI from input schema](./images/rendered-ui.png)
102106

103-
Later on, we'll be building more complex input schemas, as well as discussing how to write quality input schemas that allow the user to understand the Actor and not become overwhelmed.
107+
Later on, we'll be building more complex input schemas, as well as discussing how to write quality input schemas that allow the user to understand the Actor.
104108

105109
It's not expected to memorize all of the fields that properties can take or the different editor types available, which is why it's always good to reference the [input schema documentation](/platform/actors/development/actor-definition/input-schema) when writing a schema.
106110

sources/academy/platform/deploying_your_code/inputs_outputs.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
22
title: Managing Actor inputs and outputs
3-
description: Learn to accept input into your Actor, do something with it, and then return output. Actors can be written in any language, so this concept is language agnostic.
3+
description: Learn to accept input into your Actor, process it, and return output. This concept applies to Actors in any language.
44
sidebar_position: 1
55
slug: /deploying-your-code/inputs-outputs
66
---
77

8-
**Learn to accept input into your Actor, do something with it, and then return output. Actors can be written in any language, so this concept is language agnostic.**
8+
**Learn to accept input into your Actor, process it, and return output. This concept applies to Actors in any language.**
99

1010
---
1111

1212
Most of the time when you're creating a project, you are expecting some sort of input from which your software will run off. Oftentimes as well, you want to provide some sort of output once your software has completed running. Apify provides a convenient way to handle inputs and deliver outputs.
1313

14-
An important thing to understand regarding inputs and outputs is that they are read/written differently depending on where the Actor is running:
14+
Understanding inputs and outputs is essential because they are read/written differently depending on where the Actor is running:
1515

1616
- If your Actor is running locally, the inputs/outputs are usually provided in the filesystem, and environment variables are injected either by you, the developer, or by the Apify CLI by running the project with the `apify run` command.
1717

@@ -160,7 +160,11 @@ await Actor.exit();
160160

161161
Just as with the custom `get_input()` utility function, you can write a custom `set_output()` function as well if you cannot use the Apify SDK.
162162

163-
> You can read and write your output anywhere; however, it is standard practice to use a folder named **storage**.
163+
:::note Storage location
164+
165+
You can read and write your output anywhere; however, it is standard practice to use a folder named `storage`.
166+
167+
:::
164168

165169
```py
166170
# index.py

sources/academy/platform/deploying_your_code/output_schema.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,11 @@ const results = {
160160

161161
Great! Now that everything is set up, it's time to run the Actor and admire your Actor's brand new output tab.
162162

163-
> Need some extra guidance? Visit the [dataset schema documentation](/platform/actors/development/actor-definition/dataset-schema) for more detailed information about how to implement this feature.
163+
:::tip Additional resources
164+
165+
Visit the [dataset schema documentation](/platform/actors/development/actor-definition/dataset-schema) for more detailed information about how to implement this feature.
166+
167+
:::
164168

165169
A few seconds after running the Actor, you should see its results displayed in the `Overview` table.
166170

0 commit comments

Comments
 (0)