Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
package

GitHub Action

DDN Deployment

2.0.0

DDN Deployment

package

DDN Deployment

Deploy to a Hasura DDN environment

Installation

Copy and paste the following snippet into your .yml file.

              

- name: DDN Deployment

uses: hasura/[email protected]

Learn more about this action in hasura/ddn-deployment

Choose a version

Automate Hasura DDN Deployments

This repository contains the code to automate the deployment of a Hasura v3 project on Hasura DDN.

Prerequisites

Hasura Account

A Hasura account is required to use this tool. You can sign up for a free account at Hasura Cloud.

Hasura Personal Access Token (PAT)

A Hasura Personal Access Token (PAT) is required to authenticate with Hasura Cloud. You can create a PAT from the Access Tokens page of Hasura Cloud. You'll then need to add the following secret to your repository:

HASURA_PAT: <your-hasura-pat>

Usage

In any workflow, add the following steps to automate the deployment of your Hasura project to Hasura DDN:

name: Hasura DDN Build

on:
  push:
    branches:
      - main
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Hasura DDN Build
        uses: hasura/[email protected]
        with:
          hasura-pat: ${{ secrets.HASURA_PAT }}
          build_description: "This build was created using CI/CD"

Examples

Automatic Builds on Every Commit on a branch

Imagine you have a branch called main that you use to create a DDN build. You can use the following workflow:

name: Automatic Builds from main branch

on:
  push:
    branches:
      - main

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Deploy Hasura Project
        uses: hasura/[email protected]
        with:
          hasura-pat: ${{ secrets.HASURA_PAT }}
          build_description: "This build was created using CI/CD"

Resources

Check out the deployment guide in our docs 🚀