Skip to content

Commit

Permalink
ci: get documentation tuono version automatically (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcalexiei authored Jan 29, 2025
1 parent eb9039d commit 362e1be
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/documentation-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,16 @@ jobs:
- name: Setup rust
uses: actions-rust-lang/setup-rust-toolchain@v1

# ⬇️ Keep in sync with `.github/workflows/deploy-documentation.yml`
- name: Read tuono version used by the documentation
id: get_tuono_version
run: |
VERSION=$(pnpm ls tuono --filter=documentation | grep "tuono " | sed -E 's/.* ([0-9]+\.[0-9]+\.[0-9]+).*/\1/')
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Install tuono
run: cargo install [email protected]
run: cargo install tuono@${{ steps.get_tuono_version.outputs.version }}
# ⬆️

- name: Build project
working-directory: ./apps/documentation
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/documentation-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy documentation website on AWS S3
name: Documentation Website Deploy on AWS S3

on:
push:
Expand Down Expand Up @@ -26,8 +26,16 @@ jobs:
- name: Setup rust
uses: actions-rust-lang/setup-rust-toolchain@v1

# ⬇️ Keep in sync with `.github/workflows/ci-documentation.yml`
- name: Read tuono version used by the documentation
id: get_tuono_version
run: |
VERSION=$(pnpm ls tuono --filter=documentation | grep "tuono " | sed -E 's/.* ([0-9]+\.[0-9]+\.[0-9]+).*/\1/')
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Install tuono
run: cargo install [email protected]
run: cargo install tuono@${{ steps.get_tuono_version.outputs.version }}
# ⬆️

- name: Build project
working-directory: ./apps/documentation
Expand Down

0 comments on commit 362e1be

Please sign in to comment.