Skip to content

Commit

Permalink
Add GitHub Actions workflow for deploying Serverless app
Browse files Browse the repository at this point in the history
  • Loading branch information
umihico committed Feb 17, 2024
1 parent 1b5b793 commit 4b314ff
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: check

on:
- push

permissions:
id-token: write
contents: read

concurrency:
group: deploy-prod-stack

jobs:
check:
runs-on: ubuntu-latest
env:
AWS_REGION: ap-northeast-1
steps:
- uses: actions/checkout@v4
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ env.AWS_REGION }}
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
- name: Install Serverless Framework
run: npm install -g serverless
- name: Wait for CloudFormation stack to be updated
run: aws cloudformation wait stack-update-complete --stack-name="docker-selenium-lambda-prod" || true
- name: Deploy
run: sls deploy
- name: Invoke
run: sls invoke --function demo |& tee /tmp/scraping-result.txt
- name: Check
run: cat /tmp/scraping-result.txt | grep -q "This domain is for use in illustrative examples in documents"

0 comments on commit 4b314ff

Please sign in to comment.