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.
DETA_ACCESS_TOKEN
The access token generated by Deta.(This is not same as Deta API token). Deta access tokens are valid for 1 year. So remember to change it before it expires
You can generate your own access token from your Deta account in order to avoid web login.
- On your project's page click on the Settings button;
- Navigate to Secrets panel;
- Required: Click on New secret and Name it
DETA_ACCESS_TOKEN
and paste the access token obtained from DETA - Required: Create a New Secret with name as
DETA_MICRO_NAME
and put your deta micro instance name - Required: Create a New Secret with name as
DETA_PROJECT_NAME
and put your deta project name instance name. You can use default project name as default
You can put your deta project directory incase it's not located in root directory or remove it . Default value will be will be .
name: Deploy to Deta Gh Action
on: push
jobs:
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: devbijay/gh-deta-deploy@1.1
with:
deta-access-token: ${{ secrets.DETA_ACCESS_TOKEN }}
deta-name: ${{ secrets.DETA_MICRO_NAME }}
deta-project: ${{ secrets.DETA_PROJECT_NAME }}
deta-project-dir: 'your_deta_project_directory_if_different_from_root' #Optional