-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce more granular GitHub workflows according to the new structu…
…re of npm scripts
- Loading branch information
1 parent
54ef063
commit 8ce7147
Showing
6 changed files
with
106 additions
and
9 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,31 @@ | ||
name: Build | ||
|
||
on: [ pull_request ] | ||
|
||
jobs: | ||
build: | ||
name: Build distribution CSS and JS | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
# TODO: Add v18 back (#374) once the docs platform is migrated to a non-Gatsby solution (#373). | ||
# node: [ 16, 18 ] | ||
node: [ 16 ] | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js ${{ matrix.node }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: npm | ||
|
||
- name: Print Node.js and npm version | ||
run: node --version && npm --version | ||
|
||
- name: Install | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build |
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,36 @@ | ||
name: Docs | ||
|
||
on: [ pull_request ] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
name: Build Docs | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Get cache ID | ||
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | ||
|
||
- name: Restore cache | ||
uses: actions/cache@v3 | ||
with: | ||
key: mkdocs-material-${{ env.cache_id }} | ||
path: .cache | ||
restore-keys: | | ||
mkdocs-material- | ||
- name: Install MkDocs | ||
run: pip install 'mkdocs-material>=9.0.0,<10.0.0' | ||
|
||
- name: Build MkDocs | ||
run: mkdocs build |
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,31 @@ | ||
name: Lint | ||
|
||
on: [ pull_request ] | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
# TODO: Add v18 back (#374) once the docs platform is migrated to a non-Gatsby solution (#373). | ||
# node: [ 16, 18 ] | ||
node: [ 16 ] | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js ${{ matrix.node }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: npm | ||
|
||
- name: Print Node.js and npm version | ||
run: node --version && npm --version | ||
|
||
- name: Install | ||
run: npm ci | ||
|
||
- name: Test | ||
run: npm run lint |
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
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