Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neobrains/space-pipe
GitHub Action to push your project to Deta Space.
https://github.com/neobrains/space-pipe
cicd deployment deta deta-space github-actions neobrains
Last synced: about 1 month ago
JSON representation
GitHub Action to push your project to Deta Space.
- Host: GitHub
- URL: https://github.com/neobrains/space-pipe
- Owner: neobrains
- License: mit
- Archived: true
- Created: 2022-11-20T17:56:28.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-26T06:24:18.000Z (10 months ago)
- Last Synced: 2024-11-02T16:06:48.131Z (about 2 months ago)
- Topics: cicd, deployment, deta, deta-space, github-actions, neobrains
- Homepage:
- Size: 43.9 KB
- Stars: 47
- Watchers: 1
- Forks: 11
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-deta - Deploy Action by @neobrains - Simple GitHub Action to deploy a repo to a Deta Space. (Misc's / Github Action)
README
# Space Pipe
A simple GitHub Action to deploy your projects to [Deta Space](https://alpha.deta.space/) and let their [builder](https://alpha.deta.space/docs/en/basics/projects#projects-in-builder) build your apps.Thanks for the help ✨ [Sponge](https://github.com/rohanshiva).
## Usage
- Push your changes to create a new revision of your app.
- Release your latest revision. Each release can either be unlisted, where only people with the link can install it, or listed, which makes a release available for anyone to discover and install with [Deta Discovery](https://alpha.deta.space/discovery).## Inputs
- `access_token` : Used for Space CLI authentication. From [Deta Space Dashboard](https://alpha.deta.space), open the *teletype* (command bar) and click on *Settings*. In the settings modal, click on *Generate Token* to generate an access token and copy the resulting *access token*.- `project_id` : Used for getting the *.space folder* for pushing your code to Deta Space. To get your project id go to the [Builder](https://alpha.deta.space/builder) and in your project’s *Develop* tab, open the *teletype* (command bar) and copy the *Project ID*.
- `project_directory` : (Optional) The directory where your project is located. The default value is the root directory.
- `space_push` : (Optional) If true, pushes your changes to Space and creates a new revision. The default value is false.
- `experimental` : (Optional) If true, uses Deta Space's experimental runner. The default value is false.
- `space_release` : (Optional) If true, the latest revision will be released to Space. The default value is false.
- `list_on_discovery` : (Optional) If true, the latest revision will be listed on Space Discovery. The default value is false.
- `release_version` : (Optional) Version for the release. If not provided, Deta Space will generate a version by default.
⚠️ Neither **list_on_discovery** nor **release_version** can be used without **space_release** set to "true" as both of them are optional args of **space_release**.
⚠️ Use [GitHub Actions secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) to store your inputs.
⚠️ Make sure to add your 📝[Spacefile](https://alpha.deta.space/docs/en/reference/spacefile) in your repository. It contains the configuration of your project and is used by Deta Space to understand what your project looks like and how to run it.
## Example workflow
```
name: Push to Space
on: pushjobs:
push-to-space:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Deta Space Deployment Github Action
uses: neobrains/[email protected]
with:
access_token: ${{ secrets.ACCESS_TOKEN }}
project_id: ${{ secrets.PROJECT_ID }}
space_push: true
list_on_discovery: true
```Here [access_token](#access_token) and [project_id](#project_id) are stored as **ACCESS_TOKEN** and **PROJECT_ID** in GitHub Actions secrets. After creating a new revision with *space_push*, the latest revision will be listed on Space Discovery with **list_on_discovery**.
### Some workflow examples to manage your deployments:
- A single workflow can be created with [jobs](https://docs.github.com/en/actions/using-jobs/using-jobs-in-a-workflow#defining-prerequisite-jobs) to do space push, release of that revision and list that on Space Discovery with conditions to run a subsequent job if the previous one was successful.
- A workflow with *space_push* can be set up to run on [each push to the workflow's repository](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push). Separate workflows for *space_release* and *list_on_discovery* can be set up to run on [workflow_dispatch](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch) to be executed when needed.- Configure your workflow to do *space_push* on each push to devlopment branch, *space_release* on each push to test branch and *list_on_discovery* on each push to main or master branch.
## License
This GitHub Action and associated documentation in this project are released under the [MIT License](https://github.com/neobrains/space-deployment-github-action/blob/master/LICENSE).