Skip to content

Commit 4b13a5e

Browse files
authored
Update README with inputs, examples and acknowledgments
1 parent 4c82ac8 commit 4b13a5e

File tree

1 file changed

+58
-2
lines changed

1 file changed

+58
-2
lines changed

README.md

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,58 @@
1-
# deta-deploy-action
2-
Simple GitHub Action to deploy current repo to Deta
1+
# Deploy to Deta Micro
2+
3+
<p align="center">
4+
<i>Lots of thanks to the <a href="https://github.com/Maxsior/BotCom">BotCom</a> folks for clarification and to the <b><a href="">Deta</a> folks</b> and for all the walkthroughs and hard work! 💕</i>
5+
</p>
6+
7+
<p align="center">
8+
<a href="https://github.com/BogDAAAMN/gh-action-deta-deploy-test/actions"><img alt="javscript-action status" src="https://github.com/BogDAAAMN/gh-action-deta-deploy-test/workflows/Deploy%20to%20Deta/badge.svg"></a>
9+
</p>
10+
11+
## Usage
12+
13+
This is a simple GitHub Action to deploy current repo to a Deta Micro. Uses `deta deploy` command to deploy the latest changes as per [documentation](https://docs.deta.sh/docs/cli/commands/#deta-deploy).
14+
15+
## Inputs
16+
17+
### `deta-access-token`
18+
19+
**Required**. The access token generated by Deta. Used for `deta clone` and `deta deploy` commands.
20+
21+
You can generate your own access token from your [Deta account](https://web.deta.sh/home/) in order to avoid web login. Follow the Authetication documentation [here](https://docs.deta.sh/docs/cli/auth).
22+
23+
⚠️ Be **very** sure you don't share the token or paste it in plain text! You can add it to the GitHub project's secrets as it follows:
24+
25+
- On your project's page click on the **Settings** button;
26+
- Navigate to **Secrets** panel;
27+
- Click on **New secret**;
28+
- Name it `DETA_TOKEN` and paste the key there.
29+
30+
Now you can use the key in your project's actions as `${{ secrets.DETA_TOKEN }}`. Read more about [GitHub Secrets](https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets).
31+
32+
![GitHub Visual Instructions](https://github.com/BogDAAAMN/copy-sentiment-analysis/blob/v0.6.1/_static/gif/github.gif)
33+
34+
### `deta-name`
35+
36+
**Required**. The name of the existing Deta Micro you are deploying to. Used for `deta clone` command in order to retrieve the latest information about the targeted Micro.
37+
38+
### `deta-project`
39+
40+
The name of the Deta project your Micro is part of. Used for `deta clone` command in order to retrieve the latest information about the targeted Micro. Default `"default"`.
41+
42+
## Example action workflow
43+
44+
```yaml
45+
name: Deploy to Deta
46+
on: push
47+
48+
jobs:
49+
deploy:
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v2 #Be sure you check-out the repo first. Deta CLI needs access to the files
53+
- uses: BogDAAAMN/deta-deploy-action@v1.0.0
54+
with:
55+
deta-access-token: ${{ secrets.DETA_TOKEN }} #Deta access token https://docs.deta.sh/docs/cli/auth
56+
deta-name: 'micro-name' #Deta Micro name https://docs.deta.sh/docs/cli/commands/#deta-clone
57+
deta-project: 'project-name' #Deta project name https://docs.deta.sh/docs/cli/commands/#deta-clone
58+
```

0 commit comments

Comments
 (0)