Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 30 additions & 10 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Dev
name: Deploy to Development

on:
push:
Expand All @@ -9,6 +9,13 @@ permissions:
id-token: write
contents: read

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

concurrency:
group: development-deployment
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -17,30 +24,43 @@ jobs:

defaults:
run:
working-directory: vite-app
working-directory: .

steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v5

- uses: actions/setup-node@v4
- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: 22
cache: npm
cache-dependency-path: package-lock.json

- run: npm install
- name: Install dependencies and build
run: npm ci

- run: npm run test -- --run
- name: Build application
run: npm run build

- run: npm run build
- name: Debug GitHub Context
run: |
echo "Repository: ${{ github.repository }}"
echo "Ref: ${{ github.ref }}"
echo "Environment: dev"

- uses: aws-actions/configure-aws-credentials@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: us-east-1

- run: |
- name: Sync files to S3
run: |
aws s3 sync dist/ s3://${{ secrets.S3_BUCKET }} --delete

- run: |
- name: Invalidate CloudFront distribution
run: |
aws cloudfront create-invalidation \
--distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} \
--paths "/*"
6 changes: 0 additions & 6 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ jobs:
- name: Build application
run: npm run build

- name: Debug GitHub Context
run: |
echo "Repository: ${{ github.repository }}"
echo "Ref: ${{ github.ref }}"
echo "Environment: prod"

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ crash.*.log
# Exclude all .tfvars files, which are likely to contain sensitive data
*.tfvars
*.tfvars.json
.tfvars*
.tfvars

# Ignore override files
override.tf
Expand Down
Loading
Loading