Skip to content

Commit

Permalink
chore: Auto generate docs on push (#12)
Browse files Browse the repository at this point in the history
* chore: Auto generate docs on push

* Remove codecov npm task
  • Loading branch information
nev21 authored Sep 21, 2024
1 parent b09b487 commit 1df1fc3
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 34 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ jobs:
run: node common/scripts/install-run-rush.js test --verbose
timeout-minutes: 15

- name: Report Coverage
run: npm run codecov

- name: Upload Core Coverage
uses: codecov/codecov-action@v2
with:
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/jekll-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll with GitHub Pages dependencies preinstalled

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Update rush shrinkwrap dependencies (for different node versions)
run: node common/scripts/install-run-rush.js update --full
- run: npm install rollup -g
- run: npm install grunt-cli
- run: npm install
- run: node common/scripts/install-run-rush.js check
- run: node common/scripts/install-run-rush.js install
- run: npm run build --verbose
timeout-minutes: 20
- name: Generate the current Docs
run: npm run docs
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./docs
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
9 changes: 0 additions & 9 deletions common/config/rush/command-line.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@
"enableParallelism": false,
"ignoreMissingScript": false,
"allowWarningsInSuccessfulBuild": true
},
{
"commandKind": "bulk",
"name": "codecov",
"summary": "Run all coverage for all packages",
"description": "Runs coverage for all projects",
"safeForSimultaneousRushProcesses": false,
"enableParallelism": true,
"ignoreMissingScript": false
}
]
}
19 changes: 0 additions & 19 deletions common/config/rush/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"coverage:report": "npm run coverage:nyc && npm run coverage:merge",
"coverage:nyc": "nyc report --reporter=json",
"coverage:merge": "node ../tools/coverage/merge-coverage.js",
"codecov": "npm run coverage:report && codecov -f coverage/*.json --disable=gcov",
"clean": "git clean -xdf && npm install",
"cleanBuild": "npm run clean && npm run rebuild && npm run docs",
"docs": "npx typedoc",
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"build": "rush build",
"rebuild": "rush rebuild",
"test": "rush test",
"codecov": "rush codecov",
"clean": "git clean -xdf && npm install",
"cleanBuild": "npm run clean && npm run rebuild && npm run docs",
"docs": "npm run docs-core && npm run docs-chai",
Expand Down
1 change: 0 additions & 1 deletion shim/chai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"coverage:report": "npm run coverage:nyc && npm run coverage:merge",
"coverage:nyc": "nyc report --reporter=json",
"coverage:merge": "node ../../tools/coverage/merge-coverage.js",
"codecov": "npm run coverage:report && codecov -f coverage/*.json --disable=gcov",
"clean": "git clean -xdf && npm install",
"cleanBuild": "npm run clean && npm run rebuild && npm run docs",
"docs": "npx typedoc",
Expand Down

0 comments on commit 1df1fc3

Please sign in to comment.