Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bogdaaamn/deta-deploy-action
Simple GitHub Action to deploy current repo to a Deta Micro
https://github.com/bogdaaamn/deta-deploy-action
action cd ci deploy deployment deta github-actions
Last synced: 2 months ago
JSON representation
Simple GitHub Action to deploy current repo to a Deta Micro
- Host: GitHub
- URL: https://github.com/bogdaaamn/deta-deploy-action
- Owner: bogdaaamn
- License: mit
- Created: 2020-12-07T22:11:48.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-06-12T09:58:29.000Z (over 1 year ago)
- Last Synced: 2024-10-02T22:16:35.919Z (4 months ago)
- Topics: action, cd, ci, deploy, deployment, deta, github-actions
- Homepage: https://github.com/marketplace/actions/deploy-to-deta
- Size: 13.7 KB
- Stars: 79
- Watchers: 4
- Forks: 17
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
> ⚠️ **Deta Cloud** as been sunset since Thursday, June 1st, 2023 at 11:59 PM. Unfortunately this project will not be maintained to support Deta Space instead. Read more about it here https://deta.space/migration/introduction
>
> There is yet one community maintained GitHub Action for Space at [space-deployment-github-action](https://github.com/neobrains/space-deployment-github-action). Otherwise checkout or ask for help on Discord https://go.deta.dev/discord# Deploy to Deta Micro
Lots of thanks to the BotCom folks for clarification and to the Deta folks and for all the walkthroughs and hard work! 💕## Usage
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).
## Inputs
### `deta-access-token`
**Required**. The access token generated by Deta. Used for `deta clone` and `deta deploy` commands.
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).
⚠️ 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:
- On your project's page click on the **Settings** button;
- Navigate to **Secrets** panel;
- Click on **New secret**;
- Name it `DETA_TOKEN` and paste the key there.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).
![GitHub Visual Instructions](https://github.com/BogDAAAMN/copy-sentiment-analysis/blob/v0.6.1/_static/gif/github.gif)
### `deta-name`
**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.
### `deta-project`
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"`.
### `deta-project-dir`
The name of the directory where the Deta code is located, in cases where the project is not located in the root directory. Default `.` (the root)
## Example action workflow
```yaml
name: Deploy to Deta
on: pushjobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2 #Be sure you check-out the repo first. Deta CLI needs access to the files
- uses: BogDAAAMN/[email protected]
with:
deta-access-token: ${{ secrets.DETA_TOKEN }} #Deta access token https://docs.deta.sh/docs/cli/auth
deta-name: 'micro-name' #Deta Micro name https://docs.deta.sh/docs/cli/commands/#deta-clone
deta-project: 'project-name' #Optional: Deta project name https://docs.deta.sh/docs/cli/commands/#deta-clone
deta-project-dir: 'other-dir' #Optional: directory to be deployed on Deta. Default is the root "."
```