Prod Deploy #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
name: One-off Deploy | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- name: Cache Next.js Build | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
.next/ | ||
.open-next/ | ||
.sst/ | ||
key: cache-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles("**.[jt]s', '**.[jt]xs', ) }} | ||
Check failure on line 22 in .github/workflows/main.yaml GitHub Actions / One-off DeployInvalid workflow file
|
||
restore-keys: | | ||
cache-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
- name: Install pnpm | ||
run: npm install -g pnpm | ||
- name: Install dependencies | ||
run: pnpm install | ||
- 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: Set SST Config Secret | ||
run: | | ||
npx sst secret set COMMIT_SHA ${{ github.sha }} --stage production | ||
- name: Deploy with SST | ||
run: pnpm run deploy | ||
- name: Clean up AWS Profile | ||
run: rm -rf ~/.aws |