From 23b4832644597e8b557d69f0efb3ab0a413a231f Mon Sep 17 00:00:00 2001 From: SoumayaMauthoorMOJ Date: Mon, 22 Jul 2024 16:30:34 +0100 Subject: [PATCH] publish investigations to github pages --- .github/workflows/gh-deploy.yml | 34 ++++++++++++++++++++++++--------- README.md | 6 ++++-- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/.github/workflows/gh-deploy.yml b/.github/workflows/gh-deploy.yml index 7300614..cf1412a 100644 --- a/.github/workflows/gh-deploy.yml +++ b/.github/workflows/gh-deploy.yml @@ -36,17 +36,33 @@ jobs: - name: Download moj theme run: wget https://raw.githubusercontent.com/ministryofjustice/marp-moj-theme/main/themes/moj.css - - name: Get changed mission statement - id: changed-mission-statement - uses: tj-actions/changed-files@v44 - with: - files: mission_statement/README.md - - - name: Marp Build (README) - # if: steps.changed-mission-statement.outputs.any_changed == 'true' + - name: Marp Build (Mission statement) run: | - npx @marp-team/marp-cli@latest slide-deck.md mission_statement/README.md \ + npx @marp-team/marp-cli@latest mission_statement/README.md \ -o build/index.html --theme moj.css --html + + - name: Create directories (Investigations) + run: | + for directory in investigations/*/ ; do + mkdir -p build/$(basename $directory) + done + + - name: Copy Images directory (Investigations) + run: | + for directory in investigations/*/ ; do + if [[ -d $directory/images ]]; + then + cp -R $directory/images build/$(basename $directory)/images; + echo "copied $directory/images" + fi + done + + - name: Marp Build (Investigations) + run: | + for directory in investigations/*/ ; do + npx @marp-team/marp-cli@latest $directory/README.md \ + -o build/$(basename $directory)/index.html --theme moj.css --html + done - name: Setup Pages uses: actions/configure-pages@v5 diff --git a/README.md b/README.md index 3c5824b..a79b9e3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Centre for Excellence -This repo is used to define Centre for Excellence' mission statement. +The Centre for Excellence sets the technical direction for Data and Analytics Engineering. See the [mission statement](https://moj-analytical-services.github.io/dmet-cfe/) for how we do this. -It also documents various investigations completed by the Centre for Excellence. \ No newline at end of file +## Investigations + +Summarises investigations into new technologies, tools and approaches. Slides are created using Markdown and [Marp](https://marp.app/) and published to https://moj-analytical-services.github.io/dmet-cfe/ using a GitHub action