Update index.html #31
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: main | |
on: push | |
env: | |
PYTHON_VERSION: 3.9 | |
AWS_DEFAULT_REGION: 'us-east-1' | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
jobs: | |
test-app: | |
runs-on: ubuntu-latest | |
timeout-minutes: 3 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2.2.2 | |
with: | |
python-version: ${{env.PYTHON_VERSION }} | |
- name: install boto3 | |
run: pip install boto3 | |
- name: install simplejson | |
run: pip install simplejson | |
- name: Test Get Function | |
run: cd getFunction && python test.py -v && cd .. | |
- name: Test Put Function | |
run: cd putFunction && python test.py -v && cd .. | |
deploy-infra: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
architecture: 'x64' | |
- uses: aws-actions/setup-sam@v1 | |
- 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: us-east-1 | |
- run: sam build | |
- run: sam deploy --no-confirm-changeset --no-fail-on-empty-changeset | |
deploy-site: | |
needs: deploy-infra | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- 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: us-east-1 | |
- name: Deploy site | |
run: aws s3 sync ./resume-site s3://ian-cahall-cloud-website | |