Skip to content

Commit 4e8bfb2

Browse files
committed
Update website deployment CI script to output auto-generated code docs artifacts
1 parent e025103 commit 4e8bfb2

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/website.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
pull_request:
1010
paths:
1111
- website/**
12+
workflow_dispatch: {}
1213
env:
1314
CARGO_TERM_COLOR: always
1415
INDEX_HTML_HEAD_INCLUSION: <script defer data-domain="graphite.rs" data-api="/visit/event" src="/visit/script.hash.js"></script>
@@ -82,6 +83,28 @@ jobs:
8283
run: |
8384
mv website/other/dist/* website/public
8485
86+
- name: 💿 Obtain cache of auto-generated code docs artifacts
87+
id: cache-website-code-docs
88+
uses: actions/cache/restore@v3
89+
with:
90+
path: artifacts
91+
key: website-code-docs
92+
93+
- name: 📁 Fallback in case auto-generated code docs artifacts weren't cached
94+
if: steps.cache-website-code-docs.outputs.cache-hit != 'true'
95+
run: |
96+
echo "🦀 Initial system version of Rust:"
97+
rustc --version
98+
rustup update stable
99+
echo "🦀 Latest updated version of Rust:"
100+
rustc --version
101+
cargo test --package graphite-editor --lib -- messages::message::test::generate_message_tree
102+
mkdir -p website/public
103+
104+
- name: 🚚 Move `artifacts` contents to `website/public`
105+
run: |
106+
mv artifacts/* website/public
107+
85108
- name: 📤 Publish to Cloudflare Pages
86109
id: cloudflare
87110
uses: cloudflare/pages-action@1

0 commit comments

Comments
 (0)