Skip to content

Commit 4b314ff

Browse files
committed
Add GitHub Actions workflow for deploying Serverless app
1 parent 1b5b793 commit 4b314ff

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/check.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: check
2+
3+
on:
4+
- push
5+
6+
permissions:
7+
id-token: write
8+
contents: read
9+
10+
concurrency:
11+
group: deploy-prod-stack
12+
13+
jobs:
14+
check:
15+
runs-on: ubuntu-latest
16+
env:
17+
AWS_REGION: ap-northeast-1
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: aws-actions/configure-aws-credentials@v4
21+
with:
22+
aws-region: ${{ env.AWS_REGION }}
23+
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
24+
- name: Install Serverless Framework
25+
run: npm install -g serverless
26+
- name: Wait for CloudFormation stack to be updated
27+
run: aws cloudformation wait stack-update-complete --stack-name="docker-selenium-lambda-prod" || true
28+
- name: Deploy
29+
run: sls deploy
30+
- name: Invoke
31+
run: sls invoke --function demo |& tee /tmp/scraping-result.txt
32+
- name: Check
33+
run: cat /tmp/scraping-result.txt | grep -q "This domain is for use in illustrative examples in documents"

0 commit comments

Comments
 (0)