Skip to content

Testing deployment

Testing deployment #4

name: Deploy VitePress to AWS
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout www repo
uses: actions/checkout@v4
- name: Checkout fennecs
uses: actions/checkout@v4
with:
repository: outfox/fennecs
path: fennecs
- 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