Skip to content

Commit 73e6876

Browse files
committed
Add build pages action
1 parent da602c2 commit 73e6876

2 files changed

Lines changed: 43 additions & 4 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- sandbox
8+
- 'environment/**'
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-8g-4cpu-arm64
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v3
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: 22
22+
cache: npm
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Build
28+
run: npm run build
29+
30+
- name: Login to Amazon ECR
31+
id: login-ecr
32+
uses: aws-actions/amazon-ecr-login@v2
33+
34+
- name: Setup ORAS CLI
35+
uses: oras-project/setup-oras@v1
36+
with:
37+
version: 1.2.3
38+
39+
- name: Push artifact to AWS ECR using ORAS
40+
run: |
41+
cd $NPM_WORKSPACE/build
42+
oras push "${{ steps.login-ecr.outputs.registry }}/topper-docs:${GITHUB_SHA}"

.github/workflows/deploy.docusaurus.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
name: Deploy
22

33
on:
4-
pull_request:
5-
push:
6-
branches:
7-
- master
4+
workflow_dispatch:
85

96
jobs:
107
build:

0 commit comments

Comments
 (0)