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 14
14
steps :
15
15
- name : Checkout repo
16
16
uses : actions/checkout@v3
17
+ with :
18
+ fetch-depth : 0
17
19
18
20
- name : Set up Python
19
21
uses : actions/setup-python@v4
37
39
- name : Install dependencies
38
40
run : poetry install --all-extras
39
41
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
+
40
55
- name : fetch from gh-pages
41
56
run : git fetch origin gh-pages --depth=1
42
57
47
62
48
63
- name : Deploy with mike
49
64
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