-
-
Notifications
You must be signed in to change notification settings - Fork 20
47 lines (44 loc) · 1.87 KB
/
deploy-staging-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools
name: Deploy to Firebase Hosting on PR
'on': pull_request
jobs:
build_and_preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
- run: cargo doc --no-deps --examples -Z rustdoc-scrape-examples
- name: Copy plots directories
run: |
declare -A example_map
example_map["01_orbit_prop"]="01_orbit_prop"
example_map["02_jwst"]="02_jwst_covar_monte_carlo"
declare -A special_cases
special_cases["03_geo_analysis"]="03_geo_raise 03_geo_drift 03_geo_sk"
for example_dir in examples/*; do
example_name=$(basename $example_dir)
if [ -d "$example_dir/plots" ]; then
if [ -n "${example_map[$example_name]}" ]; then
doc_name=${example_map[$example_name]}
mkdir -p target/doc/$doc_name/plots
cp -r $example_dir/plots/* target/doc/$doc_name/plots/
elif [ -n "${special_cases[$example_name]}" ]; then
for target_folder in ${special_cases[$example_name]}; do
mkdir -p target/doc/$target_folder/plots
cp -r $example_dir/plots/* target/doc/$target_folder/plots/
done
else
echo "No mapping found for $example_name"
fi
fi
done
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_NYX_SPACE }}'
projectId: nyx-space