From 64b6f04133b8f4e5d1d8d1232b107e1467861968 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sat, 21 Mar 2020 11:42:14 +0800 Subject: [PATCH] chore: support netlify --- README.md | 3 ++- build.sh | 1 + netlify.toml | 12 ++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 build.sh create mode 100644 netlify.toml diff --git a/README.md b/README.md index 88335f0..288e864 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,9 @@ A push notification micro server using [Gin](https://github.com/gin-gonic/gin) f [![codebeat badge](https://codebeat.co/badges/0a4eff2d-c9ac-46ed-8fd7-b59942983390)](https://codebeat.co/projects/github-com-appleboy-gorush) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/c82e0ed283474c5686d705ce64d004f7)](https://www.codacy.com/app/appleboy/gorush?utm_source=github.com&utm_medium=referral&utm_content=appleboy/gorush&utm_campaign=Badge_Grade) [![Docker Pulls](https://img.shields.io/docker/pulls/appleboy/gorush.svg)](https://hub.docker.com/r/appleboy/gorush/) -[![](https://images.microbadger.com/badges/image/appleboy/gorush.svg)](https://microbadger.com/images/appleboy/gorush "Get your own image badge on microbadger.com") +[![microbadger](https://images.microbadger.com/badges/image/appleboy/gorush.svg)](https://microbadger.com/images/appleboy/gorush "Get your own image badge on microbadger.com") [![Release](https://github-release-version.herokuapp.com/github/appleboy/gorush/release.svg?style=flat)](https://github.com/appleboy/gorush/releases/latest) +[![Netlify Status](https://api.netlify.com/api/v1/badges/8ab14c9f-44fd-4d9a-8bba-f73f76d253b1/deploy-status)](https://app.netlify.com/sites/gorush/deploys) ## Contents diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..2b6a144 --- /dev/null +++ b/build.sh @@ -0,0 +1 @@ +make build_linux_lambda diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000..b3a3a61 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,12 @@ +[build] + command = "./build.sh" + functions = "release/linux/lambda" + +[build.environment] + GO_IMPORT_PATH = "github.com/appleboy/gorush" + GO111MODULE = "on" + +[[redirects]] + from = "/*" + to = "/.netlify/functions/gorush/:splat" + status = 200