Unverified Commit 5d94e67f authored by Thomas Bouffard's avatar Thomas Bouffard Committed by GitHub
Browse files

chore: bump to node 16 and simplify github workflows (#285)

* gh workflow: use internal 'build setup' custom action
* Update package-lock.json for npm 8 (node 16)
* Update doc + let configure nvm
parent 9e897cee
name: 'Build Setup'
description: 'Setup node'
runs:
using: "composite"
steps:
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
......@@ -21,7 +21,10 @@ jobs:
generate_static_doc:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2
- name: Build Setup
uses: ./.github/actions/build-setup
- name: Generate static documentation
run: |
./build-preview.bash --branch "${{ github.event.inputs.branch }}" --component "${{ github.event.inputs.component }}" \
......
......@@ -9,28 +9,27 @@ on:
paths:
- 'resources/*'
- 'antora-playbook.yml'
- '.github/workflows/generate-documentation.yml'
- '.github/actions/build-setup/*'
- '.github/workflows/publish-pr-preview.yml'
permissions:
# surge-preview creates or updates PR comments about the deployment status
pull-requests: write
jobs:
build_preview:
runs-on: ubuntu-20.04
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
steps:
- uses: actions/checkout@v2
if: github.event.action != 'closed'
- name: Setup node
- name: Checkout
uses: actions/checkout@v2
if: github.event.action != 'closed'
uses: actions/setup-node@v1
with:
node-version: 12.x
- uses: actions/cache@v2
- name: Build Setup
uses: ./.github/actions/build-setup
if: github.event.action != 'closed'
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Compute environment variables
if: github.event.action != 'closed'
run: |
echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF#refs/heads/})" >> $GITHUB_ENV
# the surge-preview action generates https://{{repository.owner}}-{{repository.name}}-{{job.name}}-pr-{{pr.number}}.surge.sh
......
......@@ -17,8 +17,14 @@ on:
paths:
- 'resources/*'
- 'antora-playbook.yml'
- '.github/workflows/generate-documentation.yml'
- '.github/actions/build-setup/*'
- '.github/workflows/publish-production.yml'
- 'netlify.toml'
permissions:
# netlify: notify deployments
deployments: write
jobs:
deploy_to_netlify:
runs-on: ubuntu-20.04
......@@ -27,17 +33,10 @@ jobs:
COMPONENT: ${{ github.event.client_payload.component || github.event.inputs.component }}
BRANCH: ${{ github.event.client_payload.branch || github.event.inputs.branch }}
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 12.x
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Checkout
uses: actions/checkout@v2
- name: Build Setup
uses: ./.github/actions/build-setup
- name: Install dependencies
run: npm ci
- name: Build docs
......
......@@ -38,10 +38,10 @@ More details are available in the xref:docs/architecture.adoc[Architecture Docum
=== Requirements
{url-node}[Node 12.x] (may work with newer versions, no guarantee). For more details, see the https://docs.antora.org/antora/2.3/install-and-run-quickstart/[Antora installation guide].
{url-node}[Node 16.x] (may work with newer versions, no guarantee).
While you can install Node from the official packages, we strongly recommend that you use {url-nvm}[nvm] (Node Version Manager) to install and manage Node.
Follow the {url-nvm-install}[nvm installation instructions] to set up nvm on your machine.
Follow the {url-nvm-install}[nvm installation instructions] to set up nvm on your machine. Then run `nvm use`.
[NOTE]
====
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment