fixed wrong weburl #13
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 Via SST | |
on: | |
push: | |
branches: [master] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
MONGODB_URI: ${{secrets.MONGODB_URI}} | |
USERNAME: Paul | |
WEBURL: https://nathancody.xyz | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 18 | |
- name: Cache Next.js Build | |
uses: actions/cache@v3 | |
with: | |
path: | | |
.next/cache/ | |
.open-next/ | |
.sst/ | |
key: cache-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]xs') }} | |
restore-keys: | | |
cache-${{ hashFiles('**/yarn.lock.') }}- | |
- run: npm install -g yarn | |
- run: yarn install --frozen-lockfile | |
- run: yarn build | |
- name: Install AWS Creds | |
run: | | |
mkdir -p ~/.aws | |
echo "[default]" > ~/.aws/credentials | |
echo "aws_access_key_id=${{ secrets.AWS_ACCESS_KEY_ID }}" >> ~/.aws/credentials | |
echo "aws_secret_access_key=${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> ~/.aws/credentials | |
- name: Deploy to AWS with SST | |
run: npx sst deploy --stage production | |
- name: Clean Up AWS Profile | |
run: | | |
rm -rf ~/.aws |