mirror of
https://github.com/m1k1o/neko.git
synced 2026-11-03 00:11:48 -06:00
update workflows.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
name: Build and Publish Client Artifacts
|
||||
|
||||
on:
|
||||
pull_request: # Change to push when ready to deploy
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- client/**
|
||||
- .github/workflows/client_build.yml
|
||||
|
||||
jobs:
|
||||
client_build:
|
||||
name: Build and Publish Client Artifacts
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: npm
|
||||
cache-dependency-path: client/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: ./client
|
||||
run: npm ci
|
||||
|
||||
- name: Build client
|
||||
working-directory: ./client
|
||||
run: npm run build
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: client
|
||||
path: client/dist
|
||||
@@ -6,6 +6,7 @@ on:
|
||||
- master
|
||||
paths:
|
||||
- client/**
|
||||
- .github/workflows/client_test.yml
|
||||
|
||||
jobs:
|
||||
client_test:
|
||||
@@ -16,6 +17,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
@@ -25,6 +27,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
working-directory: ./client
|
||||
run: npm ci
|
||||
|
||||
- name: Build client
|
||||
working-directory: ./client
|
||||
run: npm run build
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
name: Build and Publish Server Artifacts
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
pull_request: # Change to push when ready to deploy
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- server/**
|
||||
- .github/workflows/server_build.yml
|
||||
|
||||
jobs:
|
||||
server_build:
|
||||
@@ -13,22 +14,14 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
arch:
|
||||
- name: amd64
|
||||
platform: linux/amd64
|
||||
- name: arm64
|
||||
platform: linux/arm64
|
||||
- name: armv7
|
||||
platform: linux/arm/v7
|
||||
variant:
|
||||
- name: bullseye
|
||||
- name: server-amd64
|
||||
platform: linux/amd64
|
||||
dockerfile: Dockerfile
|
||||
- name: bookworm
|
||||
- name: server-arm64
|
||||
platform: linux/arm64
|
||||
dockerfile: Dockerfile.bookworm
|
||||
fail-fast: false
|
||||
|
||||
env:
|
||||
ARTIFACT_NAME: ${{ matrix.arch.name }}-${{ matrix.variant.name }}-server
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -53,19 +46,19 @@ jobs:
|
||||
with:
|
||||
context: ./server/
|
||||
file: ./server/${{ matrix.variant.dockerfile }}
|
||||
tags: ${{ env.ARTIFACT_NAME }}
|
||||
platforms: ${{ matrix.arch.platform }}
|
||||
tags: ${{ matrix.variant.name }}
|
||||
platforms: ${{ matrix.variant.platform }}
|
||||
load: true
|
||||
|
||||
- name: Copy artifacts
|
||||
run: |
|
||||
container_id=$(docker create ${{ env.ARTIFACT_NAME }})
|
||||
mkdir -p artifacts/${{ matrix.arch.name }}-${{ matrix.variant.name }}
|
||||
docker cp $container_id:/src/bin/. artifacts/${{ matrix.arch.name }}-${{ matrix.variant.name }}/
|
||||
container_id=$(docker create ${{ matrix.variant.name }})
|
||||
mkdir -p artifacts/${{ matrix.variant.name }}
|
||||
docker cp $container_id:/src/bin/. artifacts/${{ matrix.variant.name }}/
|
||||
docker rm $container_id
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.ARTIFACT_NAME }}
|
||||
path: artifacts/${{ matrix.arch.name }}-${{ matrix.variant.name }}
|
||||
name: ${{ matrix.variant.name }}
|
||||
path: artifacts/${{ matrix.variant.name }}
|
||||
|
||||
@@ -6,6 +6,7 @@ on:
|
||||
- master
|
||||
paths:
|
||||
- server/**
|
||||
- .github/workflows/server_test.yml
|
||||
|
||||
jobs:
|
||||
server_test:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Deploy to GitHub Pages
|
||||
name: Build and Deploy Webpage to GitHub Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -6,10 +6,11 @@ on:
|
||||
- master
|
||||
paths:
|
||||
- webpage/**
|
||||
- .github/workflows/webpage_deploy.yml
|
||||
|
||||
jobs:
|
||||
webpage_build:
|
||||
name: Build Docusaurus
|
||||
name: Build and Deploy Webpage to GitHub Pages
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@@ -25,6 +26,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
working-directory: ./webpage
|
||||
run: npm ci
|
||||
|
||||
- name: Build webpage
|
||||
working-directory: ./webpage
|
||||
run: npm run build
|
||||
|
||||
@@ -6,6 +6,7 @@ on:
|
||||
- master
|
||||
paths:
|
||||
- webpage/**
|
||||
- .github/workflows/webpage_test.yml
|
||||
|
||||
jobs:
|
||||
webpage_test:
|
||||
|
||||
Reference in New Issue
Block a user