Merge pull request #273 from umihico/2024-09-03T2208/fix #13
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
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@^3 | |
- 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" | |
- name: Clean up (ECR costs) | |
run: sls remove |