Merge pull request #150 from wizelineacademy/JulioEmmmanuel-patch-2 #36
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: Deploy to SST | |
on: | |
push: | |
branches: main | |
paths-ignore: | |
- '**.md' | |
env: | |
NEXTAUTH_URL: https://d8vd0r6uuds8z.cloudfront.net | |
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} | |
jobs: | |
deploy: | |
name: deploy | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read # This is required for actions/checkout | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@v4 | |
- name: Configure AWS | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-region: us-east-1 | |
role-to-assume: arn:aws:iam::851725431297:role/Github | |
role-session-name: GitHubActions | |
role-duration-seconds: 1800 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: npm install | |
- name: Run linters | |
run: npm run lint | |
- name: Run tests | |
run: npm run test:ci | |
- name: Install SST | |
run: | | |
wget https://github.com/sst/ion/releases/download/v0.0.399/sst-linux-amd64.deb | |
sudo dpkg -i sst-linux-amd64.deb | |
sst version | |
- name: Install Bun | |
uses: oven-sh/setup-bun@v1 | |
- name: Deploy with SST | |
run: | | |
bun install | |
sst deploy --stage=juliomeza2510 --verbose |