Skip to content

A GitHub Action to automatically request Jexia to redeploy your App Hosting application.

License

Notifications You must be signed in to change notification settings

jexia/deploy-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jexia Logo

GitHub Deploy Action

Automatically request Jexia to deploy your App Hosting application.

Notable Features

  • Ability to set API Key and API Secret
  • Ability to wait until the project has been deployed
  • Ability to allow this action to fail silently

GitHub Action Inputs

User Email

with:
  email: value

(Required) (String) This is the account email used for authentication. The project you are using should be linked to this account.

User Password

with:
  password: value

(Required) (GitHub Secret) This is the password used to authenticate the request. This should be a GitHub Secret, see here for a guide.

Jexia Project ID

with:
  project_id: value

(Required) (string) The Jexia project ID, this can be found on the project's settings page within the Jexia dashboard.

Jexia Application ID

with:
  app_id: value

(Required) (String) The Jexia Application ID, this can be found on the project's "Deploy Application" page within the Jexia dashboard. You need to look for your URL, such as 61faf315-cf25-4b87-8f27-ec73b1a7e328.jexia.app. The ID for this particular URL is 61faf315-cf25-4b87-8f27-ec73b1a7e328 and follows the pattern: <app_id>.jexia.app.

API Key

with:
  api_key: value

(String) This is an API Key previously created within the Jexia dashboard, it will be passed to the application when deploying as process.env.API_KEY.

API Secret

with:
  api_secret: value

(GitHub Secret) This is an API Secret previously created within the Jexia dashboard, it will be passed to the application when deploying as process.env.API_SECRET. This should be a GitHub Secret, see here for a guide.

Wait for the deployment status

with:
  wait: true # default: false

(Boolean) This adds the flag --wait and will cause the command to run until Jexia has returned a value based on whether the deployment was successful or failed. This is not recommended and should only be used when absolutely necessary as it could cause the GitHub Action to run for around 7 minutes, which will have a large impact on your GitHub Action Minutes and could result in a high monetary cost.

Fail Silently

with:
  silent_fail: true # default: false

(Boolean) This allows the action to always exit on an exit code 0. This should only be used if you expect to trigger this event within ~10 minute intervals and don't want the whole action to fail when Jexia returns an error such as when the application is already in the process of deploying.

Please note: If a serious error occurs, such as invalid user credentials (email / password), the action will ignore your silent fail request. The philosophy behind this choice is as follows, if an error could be persistent and will cause the process to never successfully run, we will report this as an exit code 1 error.

Debug

with:
  debug: true # default: false

(Boolean) This will output values useful for debugging, such as the exact command used with the Jexia CLI.

Please note: This will knowingly output the api_secret value to the console, however, GitHub should automatically remove this as it is a known secret.

Input Types

A few pieces to describe what input each value expects.

GitHub Secret

As said by GitHub, "Encrypted secrets allow you to store sensitive information, such as access tokens, in your repository.". Please see GitHub's Official Guide regarding correctly creating and storing encrypted secrets for GitHub Actions.

String

A string could be anything, when using YAML, it does not need to be encased in quotes.

Boolean

This should be either true or false.

Usage Examples

An example of a workflow for deploying on a release.

# .github/workflows/jexia-deploy.yml

name: Deploy to Jexia
# This workflow is triggered when a release is created for repository.
on:
  release:
    types: # When a release is created
      - created

jobs:
  deploy:
    name: Deploy
    runs-on: ubuntu-latest
    steps:
      - uses: jexia/deploy-action@v1
        with:
          email: [email protected]
          password: ${{ secrets.JEXIA_USER_PASSWORD }}
          project_id: 450d7735-fb9f-4f15-b6e4-e628f2109019
          app_id: 8a5cb709-c495-4b84-950e-9b72d9d3928e
          api_key: api_key
          api_secret: ${{ secrets.JEXIA_API_SECRET }}

Contributions

Any contributions are helpful, please make a pull-request. If you would like to discuses a new feature, please create an issue first.

About

A GitHub Action to automatically request Jexia to redeploy your App Hosting application.

Resources

License

Stars

Watchers

Forks

Packages

No packages published