mirror of
https://github.com/boostorg/website-v2-docs.git
synced 2026-01-26 19:12:16 +00:00
Implement logic to fetch different CSS files based on target environment: - master branch: Uses production boostlook.css - develop branch: Uses Tino Agency's boostlook_tino.css for staging
61 lines
1.6 KiB
YAML
61 lines
1.6 KiB
YAML
#
|
|
# Copyright (c) 2024 The C++ Alliance, Inc. (https://cppalliance.org)
|
|
#
|
|
# Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
#
|
|
# Official repository: https://github.com/boostorg/website-v2-docs
|
|
#
|
|
name: Antora-UI bundle
|
|
|
|
on:
|
|
push:
|
|
branches: [ "master", "develop" ]
|
|
pull_request:
|
|
branches: [ "master", "develop" ]
|
|
workflow_dispatch:
|
|
inputs:
|
|
boostlook_branch:
|
|
description: 'Branch to use for boostlook.css'
|
|
required: true
|
|
default: 'master'
|
|
|
|
concurrency:
|
|
group: ${{format('ui-release-{0}:{1}', github.repository, github.ref)}}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
if: ${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop') && github.event_name == 'push' }}
|
|
permissions:
|
|
contents: write
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [18.x]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Build
|
|
working-directory: antora-ui
|
|
run: |
|
|
export BOOSTLOOK_BRANCH="${{ github.event.inputs.boostlook_branch || 'master' }}"
|
|
npm ci
|
|
gulp bundle
|
|
|
|
- name: Bundle
|
|
uses: svenstaro/upload-release-action@2.5.0
|
|
with:
|
|
tag: ui-${{ github.ref_name }}
|
|
file: antora-ui/build/ui-bundle.zip
|
|
asset_name: ui-bundle.zip
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
overwrite: true
|