/gh-deta-deploy

Simple GitHub Action to deploy current repo to a Deta Micro

MIT LicenseMIT

Deploy your current repo to Deta Micro

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.

Inputs

  • 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.

⚠️ Do not share the token or paste it in plain text! You havr to add it in project secret key section

  • 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

Copy & Paste These Codes Inside .github/workflows/main.yml File

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