Skip to content

Merge pull request #1559 from dwertent/fix-duplicate-metrics-call #2093

Merge pull request #1559 from dwertent/fix-duplicate-metrics-call

Merge pull request #1559 from dwertent/fix-duplicate-metrics-call #2093

Workflow file for this run

name: Docs Site
on:
push:
branches:
- main
pull_request:
release:
types: [released]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout source
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Docs Deploy
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
- name: Check if this is the latest release
run: |

Check failure on line 27 in .github/workflows/docs.yml

View workflow run for this annotation

GitHub Actions / Docs Site

Invalid workflow file

The workflow is not valid. .github/workflows/docs.yml (Line: 27, Col: 14): Unexpected symbol: '$LATEST_TAG'. Located at position 1 within expression: $LATEST_TAG == github.event.release.tag_name
LATEST_TAG=$(
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ github.token }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/releases/latest \
| jq -r '.tag_name'
)
IS_LATEST=${{ $LATEST_TAG == github.event.release.tag_name }}
echo This release is: "${{ github.event.release.tag_name }}"
echo The latest release is: "$LATEST_TAG"
echo "IS_LATEST_RELEASE=$IS_LATEST" >> "$GITHUB_ENV"
- name: Install docs dependencies
working-directory: doc-site
run: pip install -r requirements.txt
- name: Update doc site for release
if: ${{ github.event_name == 'release' && env.IS_LATEST_RELEASE != 'true' }}
working-directory: doc-site
run: mike deploy ${{ github.event.release.tag_name }} --push
- name: Update doc site for latest release
if: ${{ github.event_name == 'release' && env.IS_LATEST_RELEASE == 'true' }}
working-directory: doc-site
run: mike deploy ${{ github.event.release.tag_name }} latest -u --push
- name: Update doc site for `main` branch
if: ${{ github.event_name == 'push' }}
working-directory: doc-site
run: mike deploy head --push
- name: Test building the doc site but do not deploy it
if: ${{ github.event_name == 'pull_request' }}
working-directory: doc-site
run: mkdocs build