[Question/Idea] Is it possible to use gh-page data.js content as cached value?
I would like to compare the PR's benchmark with the master one,
My ideia is: instead use a cache, to try something with:
- name: Get previous benchmark data
run: |
echo "Fetching gh-pages branch"
git fetch origin gh-pages
echo "Checking out gh-pages branch"
git checkout gh-pages
if [ ! -d "./cache" ]; then
echo "Cache folder does not exist, creating it"
mkdir ./cache
fi
echo "Copying data file from gh-pages to cache"
cp ./dev/bench/data.js ./cache/data.js || { echo "Failed to copy data file" ; exit 1; }
echo "Checking out main branch"
git checkout -
an then run the benchmark action with minimal setup, using this content as the json external file.
Hi @RaulTrombin
I'm sorry for taking so long to get back to you.
I don't quite understand what you want to achieve. Could you please elaborate a bit more on what is your goal?
@ktrz Hey, I can't remember exatcly what was the issue, But I think it was the cache, it could be erased with long times without using the actions, then I've used the gh-page to store my previous results. So the idea proposed was to use gh-page to store cache.
This is how I'm using the actions for a Rust library running some drivers methods that read magnetometers/accelerometers/sensors...things. https://github.com/bluerobotics/navigator-rs/blob/4425d95be16c786f3a562dbc2ed6043727804917/.github/workflows/action.yml#L60