|
| 1 | +# https://github.com/yildizozan/tenserflow-lambda/blob/2c29535b9af0a396ca13e53aada10e46b0579791/.github/workflows/deploy.yml |
| 2 | +# https://github.com/destination-unknown/destination-unknown-backend-serverless/blob/master/.github/workflows/main.yml |
| 3 | +# https://github.com/search?utf8=%E2%9C%93&q=extension%3Ayml+path%3A.github%2Fworkflows%2F+serverless+python&type=Code&ref=advsearch&l=&l= |
| 4 | + |
| 5 | +name: Verify and autodeploy to staging environment |
| 6 | + |
| 7 | +on: |
| 8 | + push: |
| 9 | + branches: |
| 10 | + - deploy-alb-external |
| 11 | + - master |
| 12 | + |
| 13 | +jobs: |
| 14 | + deploy: |
| 15 | + runs-on: ubuntu-latest |
| 16 | + |
| 17 | + steps: |
| 18 | + - uses: actions/checkout@v1 |
| 19 | + |
| 20 | + - name: Set up Python 3.7 |
| 21 | + uses: actions/setup-python@v1 |
| 22 | + with: |
| 23 | + python-version: 3.7 |
| 24 | + |
| 25 | + - name: Install dependencies |
| 26 | + run: | |
| 27 | + python -m pip install --upgrade pip |
| 28 | + pip install --user pipenv |
| 29 | +# PATH="$PATH:/home/runner/.local/bin" |
| 30 | +# pipenv install |
| 31 | +# - name: Update backend |
| 32 | +# run: | |
| 33 | +# PATH="$PATH:/home/runner/.local/bin" |
| 34 | +# pipenv run python import_data/main.py |
| 35 | +# env: |
| 36 | +# GOOGLE_SHEETS_API_KEY: ${{ secrets.GOOGLE_SHEETS_API_KEY }} |
| 37 | +# - uses: stefanzweifel/[email protected] |
| 38 | +# with: |
| 39 | +# commit_message: Update backend |
| 40 | +# branch: master |
| 41 | +# env: |
| 42 | +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 43 | +# - name: Setup Node.js for use with actions |
| 44 | + |
| 45 | +# with: |
| 46 | +# version: 10.x |
| 47 | +# - name: Install Serverless and run deploy |
| 48 | +# run: | |
| 49 | +# npm install -g serverless |
| 50 | +# yarn install |
| 51 | +# PATH="$PATH:/home/runner/.local/bin" |
| 52 | +# serverless deploy |
| 53 | +# env: |
| 54 | +# SERVERLESS_ACCESS_KEY: ${{ secrets.SERVERLESS_ACCESS_KEY }} |
| 55 | + |
| 56 | + |
| 57 | + - name: serverless deploy |
| 58 | + uses: serverless/[email protected] |
| 59 | + with: |
| 60 | + args: deploy |
| 61 | + env: |
| 62 | + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} |
| 63 | + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
0 commit comments