├── Dockerfile ├── LICENSE ├── README.md ├── action.yml └── run.sh /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:12-alpine 2 | 3 | RUN apk add --no-cache git && npm install -g caprover && npm cache clean --force 4 | 5 | COPY run.sh /run.sh 6 | 7 | ENTRYPOINT ["sh","/run.sh"] -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Alexey Schebelev 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # caprover-action 2 | Action to deploy on Caprover server. 3 | 4 | 5 | ## Inputs 6 | 7 | ### `server` 8 | 9 | **Required** CapRover server's admin panel URL. Ex. https://captain.root.domain.com. 10 | 11 | ### `password` 12 | 13 | **Required** CapRover admin password. Use ${{ secrets.CAPROVER_PASSWORD }} for better security. 14 | 15 | ### `appname` 16 | 17 | **Required** Application name on the CapRover server. Must exists. 18 | 19 | ### `branch` 20 | 21 | Branch which will be deployed. *Default: master* 22 | 23 | 24 | ## Example usage 25 | ``` 26 | uses: AlexxNB/caprover-action@v1 27 | with: 28 | server: 'https://captain.root.domain.com' 29 | password: '${{ secrets.CAPROVER_PASSWORD }}' 30 | appname: 'my-app' 31 | ``` -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'CapRover Deploy' 2 | description: 'Action to deploy on Caprover server' 3 | author: 'Alexey Schebelev' 4 | branding: 5 | icon: upload-cloud 6 | color: orange 7 | inputs: 8 | server: 9 | description: 'CapRover admin panel URL. Ex. https://captain.root.domain.com' 10 | required: true 11 | password: 12 | description: 'CapRover admin password. Use $\{{ secrets.CAPROVER_PASSWORD }} for better security.' 13 | required: true 14 | appname: 15 | description: 'Application name on the CapRover server. Must exists.' 16 | required: true 17 | branch: 18 | description: 'Branch which will be deployed' 19 | required: false 20 | default: 'master' 21 | runs: 22 | using: 'docker' 23 | image: 'Dockerfile' -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | caprover deploy -h $INPUT_SERVER -p $INPUT_PASSWORD -b $INPUT_BRANCH -a $INPUT_APPNAME --------------------------------------------------------------------------------