-
Notifications
You must be signed in to change notification settings - Fork 142
65 lines (56 loc) · 1.54 KB
/
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Deploy
on:
push:
branches: [main]
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
concurrency:
group: deployment
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-2
aws-access-key-id: ${{ secrets.AMAZON_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AMAZON_SECRET_KEY }}
- name: Checkout sourcecode
uses: actions/checkout@v4
- name: Install Bun
uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun install
- name: Build website
run: bun run build
- name: Deploy website
run: make deploy
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
region:
[
af-south-1,
ap-east-1,
ap-south-1,
ap-southeast-1,
ap-southeast-2,
ca-central-1,
eu-central-1,
eu-west-2,
me-south-1,
sa-east-1,
us-west-2,
]
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-2
aws-access-key-id: ${{ secrets.AMAZON_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AMAZON_SECRET_KEY }}
- run: aws s3 sync --delete --exact-timestamp --source-region eu-west-2 --region ${{ matrix.region }} s3://www.surrealdb.com/docs s3://www.${{ matrix.region }}.surrealdb.com/docs