Skip to content

chore(deps): bump actions/upload-pages-artifact from 1 to 2 #89

chore(deps): bump actions/upload-pages-artifact from 1 to 2

chore(deps): bump actions/upload-pages-artifact from 1 to 2 #89

Workflow file for this run

#
# Project nurikit - Copyright 2023 SNU Compbio Lab.
# SPDX-License-Identifier: Apache-2.0
#
name: Build and deploy docs
on:
push:
branches:
- main
pull_request:
branches:
- main
types:
- opened
- reopened
- synchronize
- ready_for_review
workflow_dispatch:
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-deploy:
if: ${{ github.triggering_actor != 'dependabot[bot]' }}
runs-on: [self-hosted, galaxy3]
steps:
- name: Get ref name
id: resolve-ref
run: |
ref_name="${{ github.head_ref }}"
if [[ -z "$ref_name" ]]; then
ref_name="${{ github.ref_name }}"
fi
echo "ref_name=$ref_name" >>$GITHUB_OUTPUT
echo "ref_name=$ref_name" >>$GITHUB_ENV
- uses: actions/checkout@v3
with:
ref: ${{ steps.resolve-ref.outputs.ref_name }}
submodules: recursive
- name: Configure with cmake
run: |
PATH=/bin cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-S . -B build -G Ninja
- name: Build docs
run: |
PATH=/bin cmake --build build --target nuri_docs -j4
- name: Deploy
run: |
output="$HOME/www/html/docs/nurikit/$ref_name/"
mkdir -p "$output"
rsync -avh --delete build/generated/docs/html/ "$output"