-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
93 additions
and
9,459 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: npm | ||
directory: "/javascript" | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Auto generate docs as a new commit for the docs repo | ||
name: npm run docs | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# todo - run the npm install with a dockerfile setup instead of pure | ||
# install but not important to do right now since install isnt too long | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 21 | ||
|
||
- name: Install Dependencies | ||
run: | | ||
npm install | ||
- name: 👷 Write the html docs | ||
run: | | ||
npm run docs | ||
- name: Get Docs content | ||
id: get-docs | ||
run: | | ||
mkdir -p ../doc | ||
cp -rf ./docs/* ../doc/ | ||
- name: see if info is there | ||
run: | | ||
echo "ll .." | ||
ls -al .. | ||
echo "ll ." | ||
ls -al . | ||
- name: Checkout docs Repository | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: Volumetrics-io/docs | ||
ref: main | ||
token: ${{ secrets.MRJS_AND_DOCS_REPO_PAT }} | ||
|
||
- name: Update Docs | ||
run: | | ||
rm -rf auto && mkdir auto | ||
mv -f ../doc/* ./auto/ | ||
- name: Commit only if there are changes | ||
run: | | ||
if [[ -n $(git diff --exit-code) ]]; then | ||
echo "Changes detected. Committing and pushing." | ||
git config user.name 'github-actions[bot]' | ||
git config user.email 'github-actions[bot]@users.noreply.github.com' | ||
git add auto/* | ||
git commit -m "👷 MR.js - Auto Generated Docs 👷" | ||
git push --quiet --set-upstream origin HEAD | ||
else | ||
echo "No changes detected. Exiting without committing." | ||
fi | ||
env: | ||
PAT_TOKEN: ${{ secrets.MRJS_AND_DOCS_REPO_PAT }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.