Code Monkey home page Code Monkey logo

deta-deploy-action's Introduction

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! ๐Ÿ’•

javscript-action status

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

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 in order to avoid web login. Follow the Authetication documentation here.

โš ๏ธ 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.

GitHub Visual Instructions

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

name: Deploy to Deta
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: 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 "." 

deta-deploy-action's People

Contributors

bogdaaamn avatar joshuanianji avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.