-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scrape examples for docs and quicken the CI (#345)
- Loading branch information
1 parent
fbf6251
commit cfeafcf
Showing
22 changed files
with
131 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# This file was auto-generated by the Firebase CLI | ||
# https://github.com/firebase/firebase-tools | ||
|
||
name: Deploy to Firebase Hosting on merge | ||
'on': | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
build_and_deploy: | ||
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 }}' | ||
channelId: live | ||
projectId: nyx-space |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters