Skip to content

Commit 0b8d4da

Browse files
committed
ci: publish ADRs after e2e tests
1 parent 7a285b1 commit 0b8d4da

File tree

3 files changed

+26
-33
lines changed

3 files changed

+26
-33
lines changed

.github/workflows/on-merge-to-develop.yml

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -50,43 +50,12 @@ jobs:
5050
node-version: current
5151
experimental: true # best effort mode
5252

53-
publish-pages:
53+
release-alpha:
5454
needs:
5555
- quality-checks
5656
- tests-per-nodejs-version
5757
- tests-LTS-per-other-os
5858
runs-on: ubuntu-latest
59-
steps:
60-
- uses: actions/checkout@v4
61-
with:
62-
persist-credentials: false # required by JamesIves/github-pages-deploy-action
63-
fetch-depth: 0 # required by Log4brains to work correctly (needs the whole Git history)
64-
- uses: actions/setup-node@v4
65-
with:
66-
node-version-file: .nvmrc # current LTS
67-
cache: yarn
68-
cache-dependency-path: yarn.lock
69-
- run: yarn install --frozen-lockfile
70-
- name: Build and link
71-
run: |
72-
yarn build
73-
yarn link-cli
74-
echo "$(yarn global bin)" >> $GITHUB_PATH
75-
- name: Log4brains build
76-
env:
77-
HIDE_LOG4BRAINS_VERSION: "1" # TODO: use lerna to bump the version temporarily here so we don't have to hide it
78-
run: log4brains build --basePath /${GITHUB_REPOSITORY#*/}/adr
79-
- name: Publish to Github pages
80-
uses: JamesIves/github-pages-deploy-action@3.7.1
81-
with:
82-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83-
BRANCH: gh-pages
84-
FOLDER: .log4brains/out
85-
TARGET_FOLDER: adr
86-
87-
release-alpha:
88-
needs: publish-pages # we could perform this step in parallel but this acts as a last end-to-end test before releasing
89-
runs-on: ubuntu-latest
9059
steps:
9160
- uses: actions/checkout@v4
9261
with:

.github/workflows/on-release-tag.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,27 @@ jobs:
5353
os: ${{ matrix.os }}
5454
node-version: current
5555
experimental: true # best effort mode
56+
57+
publish-adr:
58+
needs: e2e-tests
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@v4
62+
with:
63+
persist-credentials: false # required by JamesIves/github-pages-deploy-action
64+
fetch-depth: 0 # required by Log4brains to work correctly (needs the whole Git history)
65+
# We don't use cache here so we really test a fresh install
66+
- uses: actions/setup-node@v4
67+
with:
68+
node-version-file: .nvmrc # current LTS
69+
- name: Install and Build Log4brains
70+
run: |
71+
npm install -g log4brains
72+
log4brains build --basePath /${GITHUB_REPOSITORY#*/}/adr
73+
- name: Publish to Github pages
74+
uses: JamesIves/github-pages-deploy-action@3.7.1
75+
with:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
BRANCH: gh-pages
78+
FOLDER: .log4brains/out
79+
TARGET_FOLDER: adr

packages/web/nextjs/next.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = withBundleAnalyzer({
1616
trailingSlash: true,
1717
serverRuntimeConfig: {
1818
PROJECT_ROOT: __dirname, // https://github.com/vercel/next.js/issues/8251
19-
VERSION: process.env.HIDE_LOG4BRAINS_VERSION ? "" : packageJson.version
19+
VERSION: packageJson.version
2020
},
2121
webpack(config, { webpack, buildId }) {
2222
// For cache invalidation purpose (thanks https://github.com/vercel/next.js/discussions/14743)

0 commit comments

Comments
 (0)