Skip to content

Commit

Permalink
added if condition in publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shravanngoswamii committed Jun 28, 2024
1 parent 9af1647 commit c514954
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ jobs:
id: read_version
run: echo "version=$(cat VERSION)" >> $GITHUB_ENV

- name: Fetch latest version from GitHub
id: fetch_latest_version
run: |
latest_version=$(curl --silent "https://api.github.com/repos/TuringLang/Turing.jl/releases/latest" | jq -r .tag_name)
echo "latest_version=$latest_version" >> $GITHUB_ENV
- name: Deploy versioned docs
uses: JamesIves/github-pages-deploy-action@v4
with:
Expand All @@ -77,6 +83,7 @@ jobs:
clean: false

- name: Deploy latest docs to root
if: env.version == env.latest_version
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
Expand Down

0 comments on commit c514954

Please sign in to comment.