-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'gh-pages' of github.com:expressjs/expressjs.com into pa…
…tch-1
- Loading branch information
Showing
890 changed files
with
14,622 additions
and
8,556 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
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,20 @@ | ||
import { readFile, writeFile } from 'node:fs/promises' | ||
import path from 'node:path' | ||
|
||
const NPMURL = 'https://registry.npmjs.org/express' | ||
|
||
const response = await (await fetch(NPMURL)).json() | ||
|
||
const { next, latest } = response['dist-tags'] | ||
|
||
try { | ||
const filePath = path.resolve(path.join('..', '..', '_data', 'express.yml')) | ||
let content = await readFile(filePath, 'utf8') | ||
|
||
content = content.replace(/current_version: ".*"/, `current_version: "${latest}"`) | ||
content = content.replace(/next_version: ".*"/, `next_version: "${next}"`) | ||
|
||
await writeFile(filePath, content, 'utf8') | ||
} catch (error) { | ||
console.error('Error updating versions in _data/express.yml:', error) | ||
} |
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,67 @@ | ||
name: Check Translation | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- gh-pages | ||
paths: | ||
- 'en/**' | ||
- 'es/**' | ||
- 'fr/**' | ||
- 'it/**' | ||
- 'id/**' | ||
- 'ja/**' | ||
- 'ko/**' | ||
- 'pt-br/**' | ||
- 'ru/**' | ||
- 'sk/**' | ||
- 'th/**' | ||
- 'tr/**' | ||
- 'uk/**' | ||
- 'uz/**' | ||
- 'zh-cn/**' | ||
- 'zh-tw/**' | ||
workflow_dispatch: | ||
inputs: | ||
prNumber: | ||
description: 'PR number to check' | ||
required: true | ||
|
||
jobs: | ||
check-translation: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
issues: write | ||
pull-requests: write | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check modified files and add labels | ||
uses: actions/github-script@v5 | ||
with: | ||
script: | | ||
const languages = ['en', 'es', 'fr', 'it', 'id', 'ja', 'ko', 'pt-br', 'ru', 'sk', 'th', 'tr', 'uk', 'uz', 'zh-cn', 'zh-tw']; | ||
const prNumber = context.eventName === 'workflow_dispatch' ? context.payload.inputs.prNumber : context.issue.number; | ||
const { data: pullRequest } = await github.rest.pulls.get({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
pull_number: prNumber | ||
}); | ||
const { data: files } = await github.rest.pulls.listFiles({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
pull_number: prNumber | ||
}); | ||
const modifiedLanguages = new Set(files.map(file => file.filename.split('/')[0])); | ||
const labelsToAdd = languages.filter(lang => !modifiedLanguages.has(lang)).map(lang => `requires-translation-${lang}`); | ||
if (labelsToAdd.length > 0) { | ||
await github.rest.issues.addLabels({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: pullRequest.number, | ||
labels: labelsToAdd | ||
}); | ||
} |
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,38 @@ | ||
name: Update External Docs | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 8 * * 1' | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
update-docs: | ||
runs-on: ubuntu-latest | ||
if: github.repository_owner == 'expressjs' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- name: Run scripts | ||
working-directory: .github/scripts | ||
run: | | ||
bash ./get-contributing.sh | ||
bash ./get-readmes.sh | ||
node ./get-express-version.mjs | ||
- name: Create Pull Request | ||
uses: gr2m/create-or-update-pull-request-action@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
commit-message: update external docs | ||
title: 'Update external docs' | ||
body: > | ||
This auto-generated PR updates external documentation to the expressjs.com repository. | ||
labels: doc | ||
team_reviewers: expressjs/docs-captains | ||
branch: external-docs-${{ github.sha }} |
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 |
---|---|---|
|
@@ -6,5 +6,7 @@ _site | |
*.iml | ||
**/.idea | ||
**/Thumbs.db | ||
Gemfile.lock | ||
|
||
.jekyll-metadata | ||
vendor | ||
.bundle |
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 @@ | ||
3.3.5 |
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
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,27 @@ | ||
# 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 | ||
|
||
# Change the permissions of the working directory | ||
RUN chmod 777 /usr/src/app | ||
|
||
# Copy the Gemfile into the image | ||
COPY Gemfile ./ | ||
COPY Gemfile.lock ./ | ||
|
||
# Install the gems | ||
RUN bundle install --no-cache | ||
|
||
# Copy the rest of the project into the image | ||
COPY . . | ||
|
||
# Expose the port Jekyll will run on | ||
EXPOSE 4000 | ||
|
||
# The default command to run Jekyll | ||
CMD ["jekyll", "serve", "--host", "0.0.0.0", "--livereload"] |
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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'github-pages', '110', group: :jekyll_plugins | ||
ruby '3.3.5' | ||
|
||
gem 'github-pages', group: :jekyll_plugins | ||
gem 'webrick' | ||
|
Oops, something went wrong.