Skip to content

Commit

Permalink
Create vitepress-deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
thygrrr authored Oct 17, 2024
1 parent 7571bdc commit c655504
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/vitepress-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy VitePress to AWS

on:
push:
branches:
- main

jobs:
build-and-deploy:
runs-on: ubuntu-latest

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

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: Install dependencies
run: npm ci

- name: Build VitePress site
run: npm run build

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1

- name: Deploy to S3
run: npm run upload

- name: Invalidate CloudFront cache
run: npm run invalidate

0 comments on commit c655504

Please sign in to comment.