File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 1414 steps :
1515 - name : Checkout repo
1616 uses : actions/checkout@v3
17+ with :
18+ fetch-depth : 0
1719
1820 - name : Set up Python
1921 uses : actions/setup-python@v4
3739 - name : Install dependencies
3840 run : poetry install --all-extras
3941
42+ - name : Get version for deployment
43+ id : get_version
44+ run : |
45+ if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
46+ # For manual runs, get the latest tag
47+ VERSION=$(git describe --tags --abbrev=0)
48+ echo "version=$VERSION" >> $GITHUB_OUTPUT
49+ else
50+ # For tag pushes, use the tag name
51+ VERSION="${{ github.ref_name }}"
52+ echo "version=$VERSION" >> $GITHUB_OUTPUT
53+ fi
54+
4055 - name : fetch from gh-pages
4156 run : git fetch origin gh-pages --depth=1
4257
4762
4863 - name : Deploy with mike
4964 run : |
50- poetry run mike deploy -b gh-pages --update-aliases --push "${{ github.ref_name }}" "latest"
65+ poetry run mike deploy -b gh-pages --update-aliases --push "${{ steps.get_version.outputs.version }}" "latest"
You can’t perform that action at this time.
0 commit comments