-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
4,945 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dist/ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"extends": [ | ||
// https://github.com/eslint/eslint/blob/main/packages/js/src/configs/eslint-recommended.js | ||
"eslint:recommended", | ||
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/recommended.ts | ||
"plugin:@typescript-eslint/recommended", | ||
// https://github.com/prettier/eslint-config-prettier/blob/main/index.js | ||
"prettier" | ||
], | ||
"plugins": ["import"], | ||
"rules": { | ||
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md | ||
"import/order": [ | ||
"error", | ||
{ | ||
"alphabetize": { | ||
"order": "asc" | ||
} | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [16] | ||
pnpm: [8] | ||
|
||
steps: | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
check-latest: true | ||
|
||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: ${{ matrix.pnpm }} | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- name: Get pnpm store directory path | ||
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
|
||
- name: Cache pnpm dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm- | ||
- run: pnpm i | ||
|
||
- run: pnpm all | ||
|
||
# @see https://github.com/actions/typescript-action/blob/a08de7557cbd661c684b5179f7e12277025ff914/.github/workflows/check-dist.yml | ||
- name: Compare the expected and actual dist/ directories | ||
run: | | ||
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then | ||
echo "Detected uncommitted changes after build. See status below:" | ||
git diff | ||
exit 1 | ||
fi | ||
id: diff | ||
# If index.js was different from expected, upload the expected version as an artifact | ||
- uses: actions/upload-artifact@v3 | ||
if: ${{ failure() && steps.diff.conclusion == 'failure' }} | ||
with: | ||
name: dist | ||
path: dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"semi": false, | ||
"trailingComma": "all", | ||
"bracketSpacing": false, | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,35 @@ | ||
# render-deploy | ||
# Render Deploy | ||
|
||
[![CI](https://github.com/ttskch/render-deploy/actions/workflows/ci.yaml/badge.svg)](https://github.com/ttskch/render-deploy/actions/workflows/ci.yaml) | ||
|
||
The most simple and customizable GitHub Action to deploy a service to [Render.com](https://render.com/). | ||
|
||
## Inputs | ||
|
||
| Name | Description | Required | Default | | ||
| --- | --- | --- | --- | | ||
| `api-key` | Render.com API key | Yes | | | ||
| `service-id` | ID of the service to deploy | Yes | | | ||
| `interval` | Interval to check deploy status (sec) | | 10 | | ||
| `timeout` | If deploy has not finished after this time, the action will fail (sec) | | 600 | | ||
|
||
## Example usage | ||
|
||
```yaml | ||
name: Render Deploy | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: ttskch/render-deploy@v1.0.0 | ||
with: | ||
api-key: ${{ secrets.RENDER_API_KEY }} | ||
service-id: ${{ secrets.RENDER_SERVICE_ID }} | ||
interval: 20 # optional | ||
timeout: 300 # optional | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Render.com Deploy | ||
description: The most simple and customizable GitHub Action to deploy a service to Render.com. | ||
author: Takashi Kanemoto | ||
branding: | ||
icon: upload-cloud | ||
color: green | ||
inputs: | ||
api-key: | ||
description: Render.com API key | ||
required: true | ||
service-id: | ||
description: ID of the service to deploy | ||
required: true | ||
interval: | ||
description: Interval to check deploy status (sec) | ||
required: false | ||
default: "10" | ||
timeout: | ||
description: If deploy has not finished after this time, the action will fail (sec) | ||
required: false | ||
default: "600" | ||
runs: | ||
using: node16 | ||
main: dist/index.js |
Oops, something went wrong.