-
Notifications
You must be signed in to change notification settings - Fork 3.5k
48 lines (48 loc) · 1.35 KB
/
prod.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
name: prod
on:
push:
branches:
- 'cesium.com'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install node 20
uses: actions/setup-node@v3
with:
node-version: '20'
- name: npm install
run: npm install
- name: lint *.js
run: npm run eslint
- name: lint *.md
run: npm run markdownlint
- name: format code
run: npm run prettier-check
deploy:
runs-on: ubuntu-latest
env:
PROD: true
AWS_ACCESS_KEY_ID: ${{ secrets.PROD_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1
BRANCH: ${{ github.ref_name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPO: ${{ github.repository }}
GITHUB_SHA: ${{ github.sha }}
steps:
- uses: actions/checkout@v3
- name: install node 20
uses: actions/setup-node@v3
with:
node-version: '20'
- name: npm install
run: npm install
- name: build website release
run: npm run website-release
- name: build apps
run: npm run build-apps
- name: deploy to cesium.com
if: ${{ env.AWS_ACCESS_KEY_ID != '' }}
run: npm run deploy-s3 -- -b "cesium.com-next" -c 'public, max-age=1800' --skip --confirm