-
Notifications
You must be signed in to change notification settings - Fork 626
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: split scripts and refine triggers (#8356)
* ci: split scripts and refine triggers * ci: run on pr * Use original branch for check jobs * Manually trigger merge * use default refs * Add back branch
- Loading branch information
Showing
9 changed files
with
100 additions
and
79 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,53 @@ | ||
name: Check | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
paths: | ||
- 'site/**' | ||
- 'scripts/**' | ||
|
||
jobs: | ||
toc: | ||
name: TOC | ||
if: "!contains(github.event.head_commit.message, '[ci skip]')" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GH_PAT || github.token }} | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: 'yarn' | ||
|
||
- name: Install Node dependencies | ||
run: yarn --frozen-lockfile | ||
|
||
- name: Setup Ruby | ||
uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: '2.x' | ||
|
||
- name: Setup data | ||
run: yarn data | ||
|
||
- name: Build Jekyll | ||
run: | | ||
gem install bundler | ||
pushd site | ||
bundle install | ||
bundle exec jekyll build -q | ||
popd | ||
- name: Build TOC | ||
run: scripts/generate-toc | ||
|
||
- name: Setup Git remote | ||
run: scripts/setup-git-ci.sh | ||
|
||
- name: Check and Commit | ||
run: scripts/check-and-commit-toc.sh |
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
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,31 @@ | ||
name: Test | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
paths: | ||
- 'site/**' | ||
- 'yarn.lock' | ||
- '**prettier**' | ||
|
||
jobs: | ||
build-site: | ||
name: Build Site | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: 'yarn' | ||
|
||
- name: Install Node dependencies | ||
run: yarn --frozen-lockfile | ||
|
||
- name: Lint | ||
run: yarn prettierbase --check | ||
|
||
- name: Build | ||
run: yarn build:site |
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