Squashed commit of the following:
commit519bd76dd5
Merge:56046a0
1e27ad4
Author: Dylan <dylanpdx@gmail.com> Date: Wed Dec 7 02:06:06 2022 +0000 Merge branch 'main' into prod commit56046a02b6
Author: Dylan <dylanpdx@gmail.com> Date: Wed Dec 7 01:09:10 2022 +0000 Updated serverless in package-lock commitee1b044268
Merge:aea2a2c
0739f71
Author: Dylan <dylanpdx@gmail.com> Date: Wed Dec 7 00:52:41 2022 +0000 Merge branch 'main' into prod commitaea2a2cb2c
Author: Dylan <dylanpdx@gmail.com> Date: Tue Dec 6 22:59:44 2022 +0000 Added verbose for debugging commitd6b61315a9
Author: Dylan <dylanpdx@gmail.com> Date: Tue Dec 6 22:45:17 2022 +0000 Added token permissions commit40f3b8b3d3
Author: Dylan <dylanpdx@gmail.com> Date: Tue Dec 6 22:42:27 2022 +0000 Deploy config update commit9684cf3faf
Author: Dylan <dylanpdx@gmail.com> Date: Tue Dec 6 19:05:20 2022 +0000 Updated actions commit0ac55ae11b
Author: Dylan <dylanpdx@gmail.com> Date: Tue Dec 6 19:02:07 2022 +0000 Updated deploy script commit812d99cd77
Author: Dylan <dylanpdx@gmail.com> Date: Tue Dec 6 18:57:20 2022 +0000 Add production deploy
This commit is contained in:
68
.github/workflows/deploy.yml
vendored
Normal file
68
.github/workflows/deploy.yml
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
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 }}
|
Reference in New Issue
Block a user