Skip to content

Commit 57cbe6c

Browse files
authored
ci: update workflows (#1924)
* ci: update CI workflows to handle pull request reviews Signed-off-by: Sebastian Beltran <bjohansebas@gmail.com> * chore: update codeowners Signed-off-by: Sebastian Beltran <bjohansebas@gmail.com> * Update .github/workflows/ci.yml --------- Signed-off-by: Sebastian Beltran <bjohansebas@gmail.com>
1 parent 722fb07 commit 57cbe6c

4 files changed

Lines changed: 47 additions & 23 deletions

File tree

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Website development
2-
* @expressjs/docs-captains @expressjs/docs-collaborators
2+
* @expressjs/docs-collaborators
33

44
# Codeowners
55
.github/CODEOWNERS @expressjs/docs-captains

.github/workflows/ci.yml

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
pull_request:
55
branches:
66
- gh-pages
7+
pull_request_review:
8+
types: [submitted]
79
push:
810
branches:
911
- gh-pages
@@ -14,32 +16,50 @@ permissions:
1416
jobs:
1517
test:
1618
runs-on: ubuntu-latest
19+
if: |
20+
github.event.pull_request.draft != true &&
21+
(github.event_name == 'pull_request_review' && github.event.review.state == 'approved') ||
22+
github.event_name != 'pull_request_review'
1723
1824
steps:
1925
- uses: actions/checkout@v4
20-
21-
- name: Setup Ruby
22-
uses: ruby/setup-ruby@13e7a03dc3ac6c3798f4570bfead2aed4d96abfb # https://github.com/ruby/setup-ruby/releases/tag/v1.244.0
2326
with:
24-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
27+
persist-credentials: false
28+
2529

2630
- name: Set up Node.js
2731
uses: actions/setup-node@v4
28-
with:
29-
node-version: 20
3032

3133
- name: Install Node.js dependencies
3234
run: npm install
3335

3436
- name: Run tests
3537
shell: bash
3638
run: npm test
37-
38-
- name: Jekyll Build
39-
run: bundle exec jekyll build
4039

41-
- name: Check Docker support
42-
shell: bash
43-
run: |
44-
docker --version
45-
make build
40+
build:
41+
name: Build
42+
runs-on: ubuntu-latest
43+
if: |
44+
github.event.pull_request.draft != true &&
45+
(github.event_name == 'pull_request_review' && github.event.review.state == 'approved') ||
46+
github.event_name != 'pull_request_review'
47+
48+
steps:
49+
- uses: actions/checkout@v4
50+
with:
51+
persist-credentials: false
52+
53+
- name: Setup Ruby
54+
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 # https://github.com/ruby/setup-ruby/releases/tag/v1.207.0
55+
with:
56+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
57+
58+
- name: Jekyll Build
59+
run: bundle exec jekyll build
60+
61+
- name: Check Docker support
62+
shell: bash
63+
run: |
64+
docker --version
65+
make build

.github/workflows/crowdin.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
steps:
1616
- name: Checkout
1717
uses: actions/checkout@v4
18+
with:
19+
persist-credentials: false
1820

1921
- name: crowdin action
2022
uses: crowdin/github-action@b8012bd5491b8aa8578b73ab5b5f5e7c94aaa6e2 # https://github.com/crowdin/github-action/releases/tag/v2.7.0

.github/workflows/update-external-docs.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,30 @@ jobs:
1515
if: github.repository_owner == 'expressjs'
1616
steps:
1717
- uses: actions/checkout@v4
18+
1819
- name: Set up Node.js
1920
uses: actions/setup-node@v4
20-
with:
21-
node-version: 20
21+
2222
- name: Run scripts
2323
working-directory: .github/scripts
2424
run: |
2525
bash ./get-contributing.sh
2626
bash ./get-readmes.sh
2727
node ./get-express-version.mjs
28+
2829
- name: Create Pull Request
2930
uses: gr2m/create-or-update-pull-request-action@v1
3031
env:
3132
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3233
with:
33-
commit-message: update external docs
34-
title: 'Update external docs'
34+
commit-message: 'docs: update external docs'
35+
title: 'docs: update external docs'
3536
body: >
36-
This auto-generated PR updates external documentation to the expressjs.com repository.
37-
labels: doc
38-
team_reviewers: expressjs/docs-captains
39-
branch: external-docs-${{ github.sha }}
37+
This auto-generated PR updates external documentation to the expressjs.com repository.
38+
39+
cc: @expressjs/docs-wg
40+
labels: docs
41+
branch: external-docs
4042

4143
synchronize-with-crowdin:
4244
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)