Nife GIT Actions Quickstart

Learn to deploy actions using Git Actions


Continuous Deployment using Nifectl (CLI) with GitHub#

  1. Ensure that your project code is available on GitHub..
  2. Get a Nife API token with nifectl auth token or login to the UI and fetch the Token
  3. Go to your newly created repository on GitHub and select Settings.
  4. Go to Secrets and create a secret called NIFE_ACCESS_TOKEN retrieved in Step Two
  5. Clone the repository to your local machine to edit it
  6. Create .github/workflows/main.yml with these contents
name: Deploy to Nife
on: [push]
jobs:
deploy:
name: Deploy proxy
runs-on: ubuntu-latest
steps:
# This step checks out a copy of your repository.
- uses: actions/checkout@v2
# This step runs .
- uses: nifetency/[email protected]
env:
NIFE_ACCESS_TOKEN: ${{ secrets.NIFE_ACCESS_TOKEN }}
with:
args: "deploy --remote-only"
  1. Commit your changes and push them up to GitHub.

The next changes and pushes will trigger based on the workflow. In this case, new images will be automatic deployed

  1. Monitor the Action Tabs in the project repository to view the logs.

Continuous Deployment using Oikos(UI) with GitHub#

  1. Add your Github PAT Here: https://launch.nife.io/settings/token . (If you need assistance obtaining Github PAT, refer to our step-by-step guide.)
  1. Deploy your application using code deployment. know more
  1. Copy your Nife API token from https://launch.nife.io/settings/token, go to your repository on GitHub, select Settings, navigate to Secrets, and create a new secret called NIFE_ACCESS_TOKEN, then paste the copied access token.

  2. Clone the repository to your local machine to edit it.

  3. Download the Config.toml file from your app configuration page and then rename it to nife.toml.

    download nife.toml
  1. Edit the your app toml file
  • Attach /archive/refs/heads/main.zip to your GitHub link:

    github = "<github-repository-link>/archive/refs/heads/main.zip"
  • Relpace build part

    [build]
    builtin = "GitHub"
  1. Move the nife.toml file to the root folder of your project. Then push it to GitHub.

  2. Open Your App Scale Section. Know More. Click on Integrate CI/CD with GitHub and then click on Commit.

download nife.toml

This pushes the main.yaml file to GitHub, which will trigger the workflow. In this case, new images will be automatically deployed.

  1. Monitor the Action Tabs in the project repository to view the logs.

More#

Find GitHub Actions on MarketPlace

Learn More GitHub Actions Documentation