-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (38 loc) · 1.01 KB
/
vitepress-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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
with:
path: fennecs-www
- 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: Change directory
run: cd fennecs-www
- 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