Skip to content

testing release

testing release #67

Workflow file for this run

name: Publish documentation
# Controls when the workflow will run
on:
push:
branches:
- master
tags:
- '[0-9]+.[0-9]+.[0-9]+'
# Allow this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Upgrade pip
run: |
# install pip=>20.1 to use "pip cache dir"
python3 -m pip install --upgrade pip
- name: Get pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-doc.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python3 -m pip install -r ./requirements-doc.txt
pip install -e .
- name: Set git credentials
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
- name: GitHub Tag Name example
run: |

Check failure on line 56 in .github/workflows/publish_doc.yaml

View workflow run for this annotation

GitHub Actions / Publish documentation

Invalid workflow file

The workflow is not valid. .github/workflows/publish_doc.yaml (Line: 56, Col: 14): Unrecognized named-value: 'GITHUB_REF_NAME'. Located at position 1 within expression: GITHUB_REF_NAME
echo "Tag name from GITHUB_REF_NAME: ${{ GITHUB_REF_NAME }}"
echo "Tag name from github.ref_name: ${{ github.ref_name }} and from github.event_name ${{ github.event_name }}"
- name: Build API reference
run: pdocs as_markdown -o docs/ dcm2bids --overwrite
- name: Build docs for new release
if: github.event_name == 'published'
run: |
VERSION=$(dcm2bids -v | awk '/dcm2bids/ {print $3}')
mike deploy -p $VERSION latest -u
- name: Build docs for new release
if: github.event_name == 'published' && startsWith(github.ref, 'refs/tags/')
run: |
VERSION=$(dcm2bids -v | awk '/dcm2bids/ {print $3}')
mike deploy -p $VERSION latest -u
# - name: Build docs for specific release (already deployed)
# if: github.event_name != 'release' && github.ref_name
# run: |
# VERSION=$(dcm2bids -v | awk '/dcm2bids/ {print $3}')
# mike deploy -p $VERSION
- name: Deploy dev version
if: ${{ github.ref == 'refs/heads/master' }}
run: |
VERSION=$(dcm2bids -v | awk '/dcm2bids/ {print $3}')
mike deploy -p $VERSION dev -u