Created
February 19, 2020 08:47
-
-
Save dehio3/7f41754e50a39914b01a831383d9a677 to your computer and use it in GitHub Desktop.
Lambda(python)をserverless Frameworkを利用してデプロイする時のGitHubActionsの設定
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: serverless deploy | |
on: [push] | |
jobs: | |
deploy: | |
name: deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.7 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pipenv | |
pipenv --version | |
pip install awscli | |
aws --version | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '10.x' | |
- name: Install Dependencies | |
run: | | |
npm install serverless -g | |
npm install | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ap-northeast-1 | |
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }} | |
role-duration-seconds: 1200 | |
- name: Deploy to Lambda | |
run: | | |
sls deploy --verbose |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment