mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-30 13:18:12 +08:00
Update website deployment CI script to output auto-generated code docs artifacts
This commit is contained in:
@@ -9,6 +9,7 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- website/**
|
- website/**
|
||||||
|
workflow_dispatch: {}
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
INDEX_HTML_HEAD_INCLUSION: <script defer data-domain="graphite.rs" data-api="/visit/event" src="/visit/script.hash.js"></script>
|
INDEX_HTML_HEAD_INCLUSION: <script defer data-domain="graphite.rs" data-api="/visit/event" src="/visit/script.hash.js"></script>
|
||||||
@@ -80,8 +81,32 @@ jobs:
|
|||||||
|
|
||||||
- name: 🚚 Move `website/other/dist` contents to `website/public`
|
- name: 🚚 Move `website/other/dist` contents to `website/public`
|
||||||
run: |
|
run: |
|
||||||
|
mkdir -p website/public
|
||||||
mv website/other/dist/* website/public
|
mv website/other/dist/* website/public
|
||||||
|
|
||||||
|
- name: 💿 Obtain cache of auto-generated code docs artifacts
|
||||||
|
id: cache-website-code-docs
|
||||||
|
uses: actions/cache/restore@v3
|
||||||
|
with:
|
||||||
|
path: artifacts
|
||||||
|
key: website-code-docs
|
||||||
|
|
||||||
|
- name: 📁 Fallback in case auto-generated code docs artifacts weren't cached
|
||||||
|
if: steps.cache-website-code-docs.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
echo "🦀 Initial system version of Rust:"
|
||||||
|
rustc --version
|
||||||
|
rustup update stable
|
||||||
|
echo "🦀 Latest updated version of Rust:"
|
||||||
|
rustc --version
|
||||||
|
cargo test --package graphite-editor --lib -- messages::message::test::generate_message_tree
|
||||||
|
mkdir artifacts
|
||||||
|
mv hierarchical_message_system_tree.txt artifacts/hierarchical_message_system_tree.txt
|
||||||
|
|
||||||
|
- name: 🚚 Move `artifacts` contents to `website/public`
|
||||||
|
run: |
|
||||||
|
mv artifacts/* website/public
|
||||||
|
|
||||||
- name: 📤 Publish to Cloudflare Pages
|
- name: 📤 Publish to Cloudflare Pages
|
||||||
id: cloudflare
|
id: cloudflare
|
||||||
uses: cloudflare/pages-action@1
|
uses: cloudflare/pages-action@1
|
||||||
|
|||||||
Reference in New Issue
Block a user