commit 519bd76dd5fde9dd58c3586cb19a43c2e5f1b4c0 Merge: 56046a0 1e27ad4 Author: Dylan <dylanpdx@gmail.com> Date: Wed Dec 7 02:06:06 2022 +0000 Merge branch 'main' into prod commit 56046a02b6d3f9a07c9067151c0a304e075c545c Author: Dylan <dylanpdx@gmail.com> Date: Wed Dec 7 01:09:10 2022 +0000 Updated serverless in package-lock commit ee1b0442683729c2123174a571a5f75bb0c668f6 Merge: aea2a2c 0739f71 Author: Dylan <dylanpdx@gmail.com> Date: Wed Dec 7 00:52:41 2022 +0000 Merge branch 'main' into prod commit aea2a2cb2cbd3bbbe9c7cc857a1c5a2258e005cf Author: Dylan <dylanpdx@gmail.com> Date: Tue Dec 6 22:59:44 2022 +0000 Added verbose for debugging commit d6b61315a9643ae3101bfdeacd14fed4e35599aa Author: Dylan <dylanpdx@gmail.com> Date: Tue Dec 6 22:45:17 2022 +0000 Added token permissions commit 40f3b8b3d3befd02e48b79ba8dcde5b5490ed8ff Author: Dylan <dylanpdx@gmail.com> Date: Tue Dec 6 22:42:27 2022 +0000 Deploy config update commit 9684cf3faf68ae2aa752d258298c2a75e9ed2a0b Author: Dylan <dylanpdx@gmail.com> Date: Tue Dec 6 19:05:20 2022 +0000 Updated actions commit 0ac55ae11b6c2ba55e41b089327f97ed1cd10237 Author: Dylan <dylanpdx@gmail.com> Date: Tue Dec 6 19:02:07 2022 +0000 Updated deploy script commit 812d99cd778837fb66cbc6eb2b4faa5e8ab63c52 Author: Dylan <dylanpdx@gmail.com> Date: Tue Dec 6 18:57:20 2022 +0000 Add production deploy
69 lines
1.9 KiB
YAML
69 lines
1.9 KiB
YAML
name: Deploy
|
|
|
|
permissions:
|
|
id-token: write
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: prod
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
push:
|
|
branches: [prod]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
environment: prod
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Configure Node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '16.x'
|
|
cache: 'npm'
|
|
|
|
- name: Install packages
|
|
run: npm install -g serverless
|
|
|
|
- name: Install serverless-wsgi
|
|
run: serverless plugin install -n serverless-wsgi
|
|
|
|
- name: Install serverless-python-requirements
|
|
run: serverless plugin install -n serverless-python-requirements
|
|
|
|
- name: Install serverless-plugin-common-excludes
|
|
run: serverless plugin install -n serverless-plugin-common-excludes
|
|
|
|
- name: Install serverless-plugin-include-dependencies
|
|
run: serverless plugin install -n serverless-plugin-include-dependencies
|
|
|
|
- name: Set up Python 3.8
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.8"
|
|
|
|
- name: Configure AWS credentials
|
|
uses: aws-actions/configure-aws-credentials@v1
|
|
with:
|
|
role-to-assume: arn:aws:iam::001057775987:role/GithubActionsOIDC-vxtwitter-Role-ZYPHWRSFIP80
|
|
role-duration-seconds: 900
|
|
aws-region: us-east-1
|
|
|
|
- name: Deploy
|
|
run: serverless deploy --verbose
|
|
env:
|
|
VXTWITTER_LINK_CACHE: ${{ secrets.VXTWITTER_LINK_CACHE }}
|
|
VXTWITTER_DATABASE: ${{ secrets.VXTWITTER_DATABASE }}
|
|
VXTWITTER_METHOD: ${{ secrets.VXTWITTER_METHOD }}
|
|
VXTWITTER_COLOR: ${{ secrets.VXTWITTER_COLOR }}
|
|
VXTWITTER_APP_NAME: ${{ secrets.VXTWITTER_APP_NAME }}
|
|
VXTWITTER_REPO: ${{ secrets.VXTWITTER_REPO }}
|
|
VXTWITTER_URL: ${{ secrets.VXTWITTER_URL }}
|
|
VXTWITTER_COMBINATION_METHOD: ${{ secrets.VXTWITTER_COMBINATION_METHOD }}
|