Enable overwrite for timeline, report, trace, and dag (#325) #178
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build docs | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - dev | ||
| permissions: | ||
| contents: write | ||
| jobs: | ||
| deploy: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| with: | ||
| fetch-depth: 0 # fetch all commits/branches | ||
| - uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: 3.x | ||
| - name: Fetch current date | ||
| id: date | ||
| run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_OUTPUT | ||
| - name: Read pipeline version from .nf-core.yml | ||
| uses: nichmor/minimal-read-yaml@v0.0.2 | ||
| id: read_yml | ||
| with: | ||
| config: ${{ github.workspace }}/.nf-core.yml | ||
| - name: Parse version | ||
| id: version | ||
| run: | | ||
| [[ ${{ steps.read_yml.outputs['template.version'] }} == *"dev"* ]] && pipeline_version="dev" || pipeline_version=${{ steps.read_yml.outputs['template.version'] }} | ||
| echo "version=$pipeline_version" >> $GITHUB_OUTPUT | ||
| - name: Setup git user | ||
| run: | | ||
| git config --global user.name "${{github.actor}}" | ||
| git config --global user.email "${{github.actor}}@users.noreply.github.com" | ||
| - uses: actions/cache@v3 | ||
| with: | ||
| key: mkdocs-material-${{ steps.date.outputs.cache_id }} | ||
| path: .cache | ||
| restore-keys: | | ||
| mkdocs-material- | ||
| - name: Install dependencies | ||
| run: pip install mkdocs-material pymdown-extensions pillow cairosvg mike | ||
| - name: Build dev docs | ||
| if: ${{ github.head_ref || github.ref_name }} == 'dev' | ||
|
Check warning on line 52 in .github/workflows/build-docs.yml
|
||
| run: | | ||
| mike deploy --push dev | ||
| - name: Build production docs | ||
| if: ${{ github.head_ref || github.ref_name }} == 'main' | ||
|
Check warning on line 57 in .github/workflows/build-docs.yml
|
||
| run: | | ||
| mike deploy --push --update-aliases ${{ steps.version.outputs.version }} latest | ||
| - name: Set default docs | ||
| run: mike set-default --push latest | ||