Skip to content

Commit 5795e2d

Browse files
committed
add deploy workflow
1 parent f6960c9 commit 5795e2d

File tree

3 files changed

+62
-6
lines changed

3 files changed

+62
-6
lines changed

.github/workflows/serverless-devs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Serverless Devs Project CI/CD
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [main_backup]
66

77
jobs:
88
serverless-devs-cd:

.github/workflows/test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Serverless Devs Test CD
1+
name: Serverless Devs Astro Website CD
22

33
on:
44
push:
@@ -20,8 +20,8 @@ jobs:
2020
- run: rm -rf .git
2121
- run: rm -rf .github
2222
- run: rm -rf node_modules
23-
# - run: s deploy -t s-test.yaml -y
24-
# - run: s info -t s-test.yaml -y
25-
- run: s deploy -t s-oss-test.yaml -y
26-
- run: s info -t s-oss-test.yaml -y
23+
- run: s deploy -t s-deploy.yaml -y
24+
- run: s info -t s-deploy.yaml -y
25+
# - run: s deploy -t s.oss.yaml -y
26+
# - run: s info -t s.oss.yaml -y
2727

s-deploy.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# ------------------------------------
2+
# 官方手册: https://manual.serverless-devs.com/user-guide/aliyun/#fc3
3+
# 有问题快来钉钉群问一下吧:33947367
4+
# ------------------------------------
5+
6+
edition: 3.0.0
7+
name: flask-app
8+
access: default
9+
vars:
10+
region: ap-northeast-1
11+
resources:
12+
framework:
13+
component: fc3
14+
props:
15+
timeout: 60
16+
cpu: 1
17+
memorySize: 2048
18+
diskSize: 512
19+
instanceConcurrency: 200
20+
region: ${vars.region}
21+
description: Serverless Devs Web Framework Function
22+
runtime: custom.debian10
23+
customRuntimeConfig:
24+
command:
25+
- python3
26+
- index.py
27+
port: 9000
28+
environmentVariables:
29+
PATH: /var/fc/lang/python3.10/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/ruby/bin:/opt/bin:/code:/code/bin
30+
PYTHONPATH: /opt/python:/code/python:/code
31+
TZ: Asia/Shanghai
32+
functionName: devs-website
33+
code: ./
34+
layers:
35+
- acs:fc:${this.props.region}:official:layers/Python3-Flask2x/versions/2
36+
triggers:
37+
- triggerName: httpTrigger
38+
triggerType: http
39+
triggerConfig:
40+
methods:
41+
- GET
42+
- POST
43+
- PUT
44+
- DELETE
45+
authType: anonymous
46+
47+
fc3_domain_0:
48+
component: fc3-domain
49+
props:
50+
region: ${vars.region}
51+
domainName: auto
52+
protocol: HTTP
53+
routeConfig:
54+
routes:
55+
- path: /*
56+
functionName: ${resources.framework.props.functionName}

0 commit comments

Comments
 (0)