This is a step-by-step guide on how to set up your repository, get the API key from DEV, add it, and every other mandatory step before you can use the workflow.
The first step is to generate a dev.to
API token.
Once you are logged into your DEV account, go to dev.to/settings/extensions
In the DEV API Keys
section, create a new key by adding a description and clicking on Generate API Key
.
You'll see the newly generated key in the same view.
Store this key and proceed to the next step.
You can follow official documentation on how to create a repository on GitHub. I will explain, even if you don't want to.
Sign in to your GitHub, select +
in the upper right corner, and then click new repository
.
Fill in details and type a name for your repository with an optional description.
You can choose private
if you don't want others to access your posts or reading list saved in the repository. Other things like LICENSE
are optional. It's up to you if you want to include it.
You still need to provide write
permissions to this token so that it can push changes to your repository.
To do this, go to repository settings > Actions > General > Workflow
permissions and select Read and Write Permissions
.
Here is a screenshot of how you can find it.
After you have granted your token the write permissions, you are all set to proceed to the next step.
To do this, go to settings > Secrets and variables > Actions
and then click on New Repository Secret
.
Now you have to put the name as DEV_TOKEN
(used in workflow) and Secret
as the API key you generated earlier from DEV.
Hooray 🎉 You're all set! You can now proceed to creating a workflow file mentioned in the README.