Skip to content

Commit

Permalink
🔀 Merge pull request #23 from NMSUD/develop
Browse files Browse the repository at this point in the history
🔖 1.0.18
  • Loading branch information
Khaoz-Topsy authored Jun 19, 2024
2 parents 37e9485 + 37c7da5 commit 2f9d225
Show file tree
Hide file tree
Showing 15 changed files with 865 additions and 1,277 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/commit-message-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ jobs:
with:
token: ${{ secrets.CHECK_COMMIT_GITHUB_TOKEN }}

- name: Setup variables
run: |
documentationUrl=$(cat ./public/CNAME)
echo "DOCUMENTATION_URL=${documentationUrl}" >> $GITHUB_ENV
# - name: Check PR commits
# run: |
# echo ${{ steps.get-pr-commits.outputs.commits }} > ./commits.json
Expand All @@ -50,6 +45,6 @@ jobs:
if: failure()
uses: mshick/add-pr-comment@v2
with:
message: Please check the commit messages in this PR! It seems that you have not used emojis, this is a requirement for this project as per our documentation ${{ env.DOCUMENTATION_URL }}
message: Please check the commit messages in this PR! It seems that you have not used emojis, this is a requirement for this project as per our documentation https://form-docs.nmsud.com
refresh-message-position: true
allow-repeats: true
36 changes: 9 additions & 27 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ concurrency:
jobs:
githubpages:
name: Github Pages
environment: github-pages
runs-on: ubuntu-latest

permissions:
Expand All @@ -26,37 +27,18 @@ jobs:
run: npm ci

- name: Setup variables
env:
WEB_UI_CONFIG: ${{ secrets.WEB_UI_CONFIG }}
run: |
documentationUrl=$(cat ./public/CNAME)
echo "DOCUMENTATION_URL=${documentationUrl}" >> $GITHUB_ENV
touch .env
echo WEB_UI_CONFIG >> .env
- name: Create output folder
- name: Build web UI
run: |
mkdir pages
cp -r ./public/assets ./pages
cp ./public/CNAME ./pages/CNAME
touch ./pages/.nojekyll
- name: Set up documentation pages
run: |
echo "[coverage report](https://${{ env.DOCUMENTATION_URL }}/coverage/index.html)" > ./docs/generated.md
echo "[view the hosted Storybook page](https://${{ env.DOCUMENTATION_URL }}/storybook)" >> ./docs/generated.md
echo "![codeCoverageBadge](https://img.shields.io/endpoint?url=https://img.shields.io/endpoint?url=https%3A%2F%2F${{ env.DOCUMENTATION_URL }}%2Fcoverage%2FcoverageBadge.json)" >> ./docs/generated.md
npm run docs:build
cp -r ./.vitepress/dist/. ./pages
- name: Create code coverage report
run: |
npm run test:coverage
npm run test:coverage-badge
cp -r ./coverage ./pages/coverage
- name: Create Storybook export
run: |
npm run storybook:build
cp -r ./storybook-static ./pages/storybook
npm run build:web
touch ./dist/.nojekyll
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: pages
folder: dist
30 changes: 30 additions & 0 deletions .github/workflows/github-trigger-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Github Trigger Documentation Build
run-name: GithubTriggerDocumentationBuild

on:
push:
branches: ['main']

concurrency:
group: 'githubdocs'
cancel-in-progress: true

jobs:
github:
name: Github Trigger Documentation Build
environment: github-pages
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- name: Trigger documentation repo
run: |
curl -XPOST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${{ secrets.TRIGGER_GITHUB_ACTION_TOKEN }}" \
https://api.github.com/repos/NMSUD/FormDocs/actions/workflows/githubActions.yml/dispatches \
--data '{"ref": "main"}'
Loading

0 comments on commit 2f9d225

Please sign in to comment.