Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions .circleci/config.yml

This file was deleted.

68 changes: 68 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: build & deploy

on:
push:
branches: [source]
pull_request:
workflow_dispatch:

permissions:
contents: read

# Let a running deploy finish rather than cancelling it half way.
concurrency:
group: deploy
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version-file: .node-version
cache: npm
- run: npm ci
- run: npm run build
# Uploaded on pull requests too, so the built site can be downloaded
# from the run page for review.
- uses: actions/upload-artifact@v7
with:
name: site
path: build

# nodejs.jp is served by Netlify out of the master branch, so publishing
# means committing the build output there. This mirrors the update.sh that
# CircleCI used to run.
deploy:
needs: build
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version-file: .node-version
cache: npm
- run: npm ci
- name: Check out master as the build destination
run: |
git clone --depth 1 -b master \
"https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" \
build
- run: npm run build
- name: Commit and push
working-directory: build
run: |
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add -A
if git diff --cached --quiet; then
echo 'nothing to publish'
exit 0
fi
git commit -m 'chore(site): automated update from github actions'
git push origin HEAD:master
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.1.4
24
12 changes: 9 additions & 3 deletions bulbofile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ const asset = bulbo.asset

const path = require('path')
const frontMatter = require('gulp-front-matter')
const nunjucks = require('gulp-nunjucks')
const markdown = require('gulp-markdown')
// gulp-nunjucks v6 / gulp-markdown v8 are ESM. require() of ESM is supported
// on Node 22.12+ so we read the named / default exports off the namespace.
const {nunjucksCompile} = require('gulp-nunjucks')
const markdown = require('gulp-markdown').default
const wrapper = require('layout-wrapper')
const accumulate = require('vinyl-accumulate')
const branch = require('branch-pipe')
Expand Down Expand Up @@ -35,7 +37,7 @@ const layout = defaultLayout => wrapper.nunjucks({
asset('source/**/*.md', '!source/{events,jobs,news}/**/*')
.watch('source/**/*.{md,njk}')
.pipe(frontMatter({property: 'fm'}))
.pipe(nunjucks.compile(data))
.pipe(nunjucksCompile(data))
.pipe(markdown())
.pipe(layout('default'))

Expand Down Expand Up @@ -128,3 +130,7 @@ asset('source/pdfs/**/*.pdf')

// Old site is available under http://nodejs.jp/old/
asset('./old/*.*').base('./')

// Keep CNAME in the published output rather than relying on the copy that
// happens to sit in master
asset('./CNAME').base('./')
Loading