diff --git a/.github/workflows/website_test.yml b/.github/workflows/client_test.yml similarity index 60% rename from .github/workflows/website_test.yml rename to .github/workflows/client_test.yml index cef141bd..c5f51b54 100644 --- a/.github/workflows/website_test.yml +++ b/.github/workflows/client_test.yml @@ -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 diff --git a/.github/workflows/server_pull_requests.yml b/.github/workflows/server_pull_requests.yml deleted file mode 100644 index b22f84fd..00000000 --- a/.github/workflows/server_pull_requests.yml +++ /dev/null @@ -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/ diff --git a/.github/workflows/server_test.yml b/.github/workflows/server_test.yml new file mode 100644 index 00000000..8569795f --- /dev/null +++ b/.github/workflows/server_test.yml @@ -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 diff --git a/.github/workflows/website_deploy.yml b/.github/workflows/webpage_deploy.yml similarity index 77% rename from .github/workflows/website_deploy.yml rename to .github/workflows/webpage_deploy.yml index b0816c0a..f6760d26 100644 --- a/.github/workflows/website_deploy.yml +++ b/.github/workflows/webpage_deploy.yml @@ -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: diff --git a/.github/workflows/webpage_test.yml b/.github/workflows/webpage_test.yml new file mode 100644 index 00000000..25ef8447 --- /dev/null +++ b/.github/workflows/webpage_test.yml @@ -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