-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* setup deploy scripts * fix profile name
- Loading branch information
Dustin Goodman
authored
Nov 27, 2023
1 parent
bcaa5f7
commit dd82c0a
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Deploy Serverless Framework | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
name: deploy | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
|
||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Configure Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
cache: 'npm' | ||
|
||
- name: Install packages | ||
run: npm ci | ||
|
||
- name: Create AWS profile | ||
uses: Fooji/create-aws-profile-action@v1 | ||
with: | ||
profile: moviesApi | ||
region: us-east-1 | ||
key: ${{ secrets.AWS_ACCESS_KEY }} | ||
secret: ${{ secrets.AWS_SECRET_KEY }} | ||
|
||
- name: Create .env file for deployment | ||
run: | | ||
touch .env | ||
echo CONTENTFUL_CONTENT_MANAGEMENT_API_TOKEN=${{ secrets.CONTENTFUL_CONTENT_MANAGEMENT_API_TOKEN }} >> .env | ||
echo CONTENTFUL_DELIVERY_API_TOKEN=${{ secrets.CONTENTFUL_DELIVERY_API_TOKEN }} >> .env | ||
echo CONTENTFUL_SPACE_ID=${{ secrets.CONTENTFUL_SPACE_ID }} >> .env | ||
echo CONTENTFUL_ENVIRONMENT=${{ secrets.CONTENTFUL_ENVIRONMENT }} >> .env | ||
cat .env | ||
- name: Deploy | ||
run: npm run deploy --stage production --region us-east-1 |
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