|
9 | 9 | pull_request: |
10 | 10 | paths: |
11 | 11 | - website/** |
| 12 | + workflow_dispatch: {} |
12 | 13 | env: |
13 | 14 | CARGO_TERM_COLOR: always |
14 | 15 | INDEX_HTML_HEAD_INCLUSION: <script defer data-domain="graphite.rs" data-api="/visit/event" src="/visit/script.hash.js"></script> |
|
30 | 31 | with: |
31 | 32 | |
32 | 33 |
|
| 34 | + - name: 🔍 Check if `website/other` directory changed |
| 35 | + uses: dorny/paths-filter@v3 |
| 36 | + id: changes |
| 37 | + with: |
| 38 | + filters: | |
| 39 | + website-other: |
| 40 | + - "website/other/**" |
| 41 | +
|
33 | 42 | - name: ✂ Replace template in <head> of index.html |
34 | 43 | run: | |
35 | 44 | # Remove the INDEX_HTML_HEAD_INCLUSION environment variable for build links (not master deploys) |
|
43 | 52 | npm run install-fonts |
44 | 53 | zola --config config.toml build --minify |
45 | 54 |
|
46 | | - - name: 🔍 Check if `website/other` directory changed |
47 | | - uses: dorny/paths-filter@v3 |
48 | | - id: changes |
49 | | - with: |
50 | | - filters: | |
51 | | - other: |
52 | | - - "website/other/**" |
53 | | -
|
54 | 55 | - name: 💿 Restore cache of `website/other/dist` directory, if available and `website/other` didn't change |
55 | | - if: steps.changes.outputs.other != 'true' |
| 56 | + if: steps.changes.outputs.website-other != 'true' |
56 | 57 | id: cache-website-other-dist |
57 | 58 | uses: actions/cache/restore@v3 |
58 | 59 | with: |
|
80 | 81 |
|
81 | 82 | - name: 🚚 Move `website/other/dist` contents to `website/public` |
82 | 83 | run: | |
| 84 | + mkdir -p website/public |
83 | 85 | mv website/other/dist/* website/public |
84 | 86 |
|
| 87 | + - name: 💿 Obtain cache of auto-generated code docs artifacts |
| 88 | + id: cache-website-code-docs |
| 89 | + uses: actions/cache/restore@v3 |
| 90 | + with: |
| 91 | + path: artifacts |
| 92 | + key: website-code-docs |
| 93 | + |
| 94 | + - name: 📁 Fallback in case auto-generated code docs artifacts weren't cached |
| 95 | + if: steps.cache-website-code-docs.outputs.cache-hit != 'true' |
| 96 | + run: | |
| 97 | + echo "🦀 Initial system version of Rust:" |
| 98 | + rustc --version |
| 99 | + rustup update stable |
| 100 | + echo "🦀 Latest updated version of Rust:" |
| 101 | + rustc --version |
| 102 | + cargo test --package graphite-editor --lib -- messages::message::test::generate_message_tree |
| 103 | + mkdir artifacts |
| 104 | + mv hierarchical_message_system_tree.txt artifacts/hierarchical_message_system_tree.txt |
| 105 | +
|
| 106 | + - name: 🚚 Move `artifacts` contents to `website/public` |
| 107 | + run: | |
| 108 | + mv artifacts/* website/public |
| 109 | +
|
85 | 110 | - name: 📤 Publish to Cloudflare Pages |
86 | 111 | id: cloudflare |
87 | 112 | uses: cloudflare/pages-action@1 |
|
0 commit comments