Merge pull request #900 from zzzhangqi/241125 #330
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |