Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
m1guelpf committed Feb 3, 2023
0 parents commit 5f5981f
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Hop Deploy Github Action

Deploy your app to [Hop](https://hop.io), using the Hop CLI.

## Inputs

| Name | Required | Description |
| :-----: | :------: | :-----------------------------------------------------------------: |
| `token` | `true` | Hop Personal Token from an user with access to the deployment. |
| `dir` | `false` | The directory to deploy from. Defaults to the root of your project. |

## Example usage

### Using with

```yaml
name: Deploy to Hop
uses: m1guelpf/hop-deploy@v1
with:
token: ${{ secrets.HOP_TOKEN }}
```
21 changes: 21 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Deploy to Hop"
description: "Deploy your project to hop.io using the Hop CLI"
branding:
color: purple
icon: cloud
inputs:
token:
description: "Personal token for your Hop account"
required: true
dir:
description: "Directory to deploy, defaults to current directory"
required: false
default: "."
runs:
using: "composite"
steps:
- run: ${{ github.action_path }}/deploy.sh
shell: bash
env:
HOP_TOKEN: ${{ inputs.token }}
DEPLOY_DIR: ${{ inputs.dir }}
5 changes: 5 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

curl -fsSL https://download.hop.sh/install | sh > /dev/null 2>&1
hop auth login --token "$HOP_TOKEN"
hop deploy "$DEPLOY_DIR"

0 comments on commit 5f5981f

Please sign in to comment.