add server and test build for pull requests.
This commit is contained in:
parent
d5a2b3f57d
commit
9d1d30fc6b
5 changed files with 69 additions and 40 deletions
|
|
@ -1,19 +1,15 @@
|
|||
name: Test Website Build
|
||||
name: Test Client Build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
working-directory: ./website
|
||||
|
||||
jobs:
|
||||
website_test:
|
||||
name: Test Website Build
|
||||
client_test:
|
||||
name: Test Client Build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
|
|
@ -22,8 +18,11 @@ jobs:
|
|||
with:
|
||||
node-version: 18
|
||||
cache: npm
|
||||
cache-dependency-path: client/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: ./client
|
||||
run: npm ci
|
||||
- name: Build website
|
||||
- name: Build client
|
||||
working-directory: ./client
|
||||
run: npm run build
|
||||
21
.github/workflows/server_pull_requests.yml
vendored
21
.github/workflows/server_pull_requests.yml
vendored
|
|
@ -1,21 +0,0 @@
|
|||
name: Build a Docker image
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build-image:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Build Docker image
|
||||
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
|
||||
with:
|
||||
context: ./server/
|
||||
23
.github/workflows/server_test.yml
vendored
Normal file
23
.github/workflows/server_test.yml
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
name: Test Server Build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
server_test:
|
||||
name: Test Server Build
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Build Docker image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ./server
|
||||
|
|
@ -5,15 +5,11 @@ on:
|
|||
branches:
|
||||
- master
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
working-directory: ./website
|
||||
|
||||
jobs:
|
||||
website_build:
|
||||
webpage_build:
|
||||
name: Build Docusaurus
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
|
|
@ -22,20 +18,24 @@ jobs:
|
|||
with:
|
||||
node-version: 18
|
||||
cache: npm
|
||||
cache-dependency-path: webpage/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: ./webpage
|
||||
run: npm ci
|
||||
- name: Build website
|
||||
- name: Build webpage
|
||||
working-directory: ./webpage
|
||||
run: npm run build
|
||||
|
||||
- name: Upload Build Artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: build
|
||||
artifact-name: github-pages
|
||||
path: ./webpage/build
|
||||
|
||||
website_deploy:
|
||||
webpage_deploy:
|
||||
name: Deploy to GitHub Pages
|
||||
needs: website_build
|
||||
needs: webpage_build
|
||||
|
||||
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
|
||||
permissions:
|
||||
28
.github/workflows/webpage_test.yml
vendored
Normal file
28
.github/workflows/webpage_test.yml
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
name: Test Webpage Build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
webpage_test:
|
||||
name: Test Webpage Build
|
||||
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: webpage/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: ./webpage
|
||||
run: npm ci
|
||||
- name: Build webpage
|
||||
working-directory: ./webpage
|
||||
run: npm run build
|
||||
Loading…
Reference in a new issue