Skip to content

feat(testing): support animation layout assertions #1003

feat(testing): support animation layout assertions

feat(testing): support animation layout assertions #1003

Workflow file for this run

name: Build Documentation
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- name: Build Documentation
run: |
cargo doc --all --no-deps
- name: Build Web Example
run: cargo +stable tessera web build --release -p example
- name: Assemble Pages Site
run: |
mkdir -p target/doc/example
cp -R example/gen/web/. target/doc/example/
cat <<'EOF' > target/doc/index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Tessera</title>
<style>
:root {
color-scheme: dark;
font-family: "Segoe UI", sans-serif;
}
body {
margin: 0;
min-height: 100vh;
display: grid;
place-items: center;
background: #0f1115;
color: #f5f7fb;
}
main {
width: min(28rem, calc(100vw - 3rem));
padding: 2rem;
border-radius: 1rem;
background: #171a21;
box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.35);
}
h1 {
margin: 0 0 0.75rem;
font-size: 1.75rem;
}
p {
margin: 0 0 1.5rem;
line-height: 1.5;
color: #c7cfdd;
}
nav {
display: flex;
gap: 0.75rem;
flex-wrap: wrap;
}
a {
color: inherit;
text-decoration: none;
padding: 0.75rem 1rem;
border-radius: 0.75rem;
background: #242938;
border: 1px solid #343c50;
}
a:hover {
background: #2c3346;
}
</style>
</head>
<body>
<main>
<h1>Tessera</h1>
<p>Browse the generated Rust API documentation or open the web example.</p>
<nav>
<a href="./tessera/">API Documentation</a>
<a href="./example/">Web Example</a>
</nav>
</main>
</body>
</html>
EOF
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Fix permissions
run: |
chmod -c -R +rX "target/doc" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "target/doc"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4