-
Notifications
You must be signed in to change notification settings - Fork 101
48 lines (41 loc) · 1.29 KB
/
main-actions.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: Rainbond Docs GitHub Actions
on:
push:
branches:
- 'main'
jobs:
rainbond-docs-build:
name: build rainbond docs
runs-on: ubuntu-latest
steps:
- name: clone rainbond-docs repo
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.0.0'
cache: 'yarn'
- name: Install dependencies
run: yarn install
- name: Build
run: yarn build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Aliyun Container Registry
uses: docker/login-action@v3
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.DOMESTIC_USERNAME }}
password: ${{ secrets.DOMESTIC_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
context: .
file: Dockerfile
push: true
tags: |
registry.cn-hangzhou.aliyuncs.com/goodrain/rainbond-docs:latest
- name: Deploy
run: |
curl -d '{"secret_key":"${{ secrets.RAINBOND_SECRET }}"}' -H "Content-type: application/json" -X POST ${{ secrets.RAINBOND_API }}