Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 8 additions & 26 deletions .github/workflows/sync_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
git fetch origin chore/update-content || true
git checkout chore/update-content || git checkout -b chore/update-content

- name: Clone visionBoard and import checks
- name: Clone visionBoard and run imports
run: |
git clone https://github.com/OpenPathfinder/visionBoard.git temp-visionBoard
cd temp-visionBoard
Expand All @@ -47,6 +47,10 @@ jobs:
mkdir -p output
npm run db:export-checks
cp output/checks.json ../data/checks.json
npm run export-policies
cp output/policies.json ../data/policies.json
npm run export-checklists
cp output/checklists.json ../data/checklists.json
cd ..
rm -rf temp-visionBoard
env:
Expand All @@ -60,41 +64,19 @@ jobs:
git status
git diff

- name: Commit Updated Checks
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add -A
git diff --cached --quiet || git commit -m "chore: sync with visionBoard Checks"

- name: Clone fortSphere and import policies
run: |
git clone https://github.com/OpenPathfinder/fortSphere.git temp-fortSphere
cd temp-fortSphere
npm install
mkdir -p output
npm run export-policies
cp output/policies.json ../data/policies.json
cd ..
rm -rf temp-fortSphere

- name: Debug Git Changes
run: |
git status
git diff

- name: Commit Updated Policies
- name: Commit Updated data imported from visionBoard
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add -A
git diff --cached --quiet || git commit -m "chore: sync with fortSphere Policies"
git diff --cached --quiet || git commit -m "chore: sync with visionBoard checks, policies and checklists"

- name: Install Dependencies and update dynamic content
run: |
npm install
npm run populate-checks
npm run populate-policies
npm run populate-checklists

- name: Debug Git Changes
run: |
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"populate-checks": "node scripts/populate-checks.js",
"populate-policies": "node scripts/populate-policies.js"
"populate-policies": "node scripts/populate-policies.js",
"populate-checklists": "node scripts/populate-checklists.js"
},
"dependencies": {
"@docusaurus/core": "3.6.3",
Expand Down
1 change: 1 addition & 0 deletions scripts/populate-checklists.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log('Not yet implemented. Skipping...');
Loading