This commit is contained in:
awei
2025-03-03 17:43:50 +08:00
commit 113756eaae
1497 changed files with 127997 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
name: bbs-go-admin
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
cache-dependency-path: admin/pnpm-lock.yaml
- name: Install dependencies
working-directory: ./admin
run: |
pnpm install
- name: Build
working-directory: ./admin
run: |
pnpm build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./admin/dist
cname: admin.bbs-go.com

View File

@@ -0,0 +1,38 @@
name: bbs-go-docker
on:
push:
branches:
- "master"
jobs:
buildx:
runs-on: ubuntu-latest
environment: docker
steps:
- name: Checkout
uses: actions/checkout@v4
# - # Add support for more platforms with QEMU (optional)
# # https://github.com/docker/setup-qemu-action
# name: Set up QEMU
# uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Install docker-compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# - name: Build and push
# uses: docker/build-push-action@v5
# with:
# push: true
# tags: latest
- name: Build and push docker image
run: |
docker-compose build
docker-compose push

View File

@@ -0,0 +1,26 @@
name: bbs-go-server
on: [ push ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21
- name: Install dependencies
working-directory: ./server
run: |
go mod download
- name: Build
working-directory: ./server
run: |
make build

View File

@@ -0,0 +1,32 @@
name: bbs-go-site
on: [ push ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 20.x ]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
cache-dependency-path: site/pnpm-lock.yaml
- name: Install dependencies
working-directory: ./site
run: |
pnpm install
- name: Build
working-directory: ./site
run: |
pnpm build