├── deploy.sh ├── action.yml └── README.md /deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | curl -fsSL https://download.hop.sh/install | sh > /dev/null 2>&1 4 | hop auth login --token "$HOP_TOKEN" 5 | hop deploy "$DEPLOY_DIR" 6 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: "Deploy to Hop" 2 | description: "Deploy your project to hop.io using the Hop CLI" 3 | branding: 4 | color: purple 5 | icon: cloud 6 | inputs: 7 | token: 8 | description: "Personal token for your Hop account" 9 | required: true 10 | dir: 11 | description: "Directory to deploy, defaults to current directory" 12 | required: false 13 | default: "." 14 | runs: 15 | using: "composite" 16 | steps: 17 | - run: ${{ github.action_path }}/deploy.sh 18 | shell: bash 19 | env: 20 | HOP_TOKEN: ${{ inputs.token }} 21 | DEPLOY_DIR: ${{ inputs.dir }} 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Hop Deploy Github Action 2 | 3 | Deploy your app to [Hop](https://hop.io), using the Hop CLI. 4 | 5 | ## Inputs 6 | 7 | | Name | Required | Description | 8 | | :-----: | :------: | :-----------------------------------------------------------------: | 9 | | `token` | `true` | Hop Personal Token from an user with access to the deployment. | 10 | | `dir` | `false` | The directory to deploy from. Defaults to the root of your project. | 11 | 12 | ## Example usage 13 | 14 | ### Using with 15 | 16 | ```yaml 17 | name: Deploy to Hop 18 | uses: hopinc/action@v1 19 | with: 20 | token: ${{ secrets.HOP_TOKEN }} 21 | ``` 22 | --------------------------------------------------------------------------------