A simple GitHub Action to deploy your projects to Deta Space and let their builder build your apps.
Thanks for the help ✨ Sponge.
- 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.
-
access_token
: Used for Space CLI authentication. From Deta Space Dashboard, 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 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.
name: Push to Space
on: push
jobs:
push-to-space:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Deta Space Deployment Github Action
uses: neobrains/space-pipe@v0.5
with:
access_token: ${{ secrets.ACCESS_TOKEN }}
project_id: ${{ secrets.PROJECT_ID }}
space_push: true
list_on_discovery: true
Here access_token and 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.
-
A single workflow can be created with 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. Separate workflows for space_release and list_on_discovery can be set up to run on 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.
This GitHub Action and associated documentation in this project are released under the MIT License.