Skip to content

Commit

Permalink
ci: fix wrong docs name
Browse files Browse the repository at this point in the history
  • Loading branch information
GabDug committed Jan 26, 2024
1 parent 420deac commit 7a39fdf
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,25 +70,26 @@ jobs:
git config user.name "FireFighter Release CI"
- name: Deploy docs (dev)
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: github.event_name == 'push' && github.ref_name == 'main' && github.ref_type == 'branch'
run: |
export SHORT_SHA=$(echo "${GITHUB_SHA}" | cut -c1-7)
pdm run mike deploy dev --update-aliases --title "dev (${SHORT_SHA})" --push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Deploy docs (tag)
if: startsWith(github.ref, 'refs/tags/') && github.event_name == 'push'
if: git.ref_type == 'tag' && github.event_name == 'push'
run: |
pdm run mike deploy ${{ github.ref }} latest --push --update-aliases
pdm run mike deploy ${{ github.ref_name }} latest --push --update-aliases
pdm run mike set-default latest --push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Deploy docs (Released published)
if: github.event_name == 'release' && github.event.action == 'published' && startsWith(github.ref, 'refs/tags/')
if: github.event_name == 'release' && github.event.action == 'published' && git.ref_type == 'tag'
run: |
pdm run mike deploy ${{ github.ref }} latest --push --update-aliases
# Version from tag, keep leading v, from github.ref workflow variable
pdm run mike deploy ${{ github.ref_name }} latest --push --update-aliases
pdm run mike set-default latest --push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 7a39fdf

Please sign in to comment.