Update README.md #20
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
name: Fetch and Push Data | |
on: | |
push: | |
# paths: | |
# - 'output/reports/visuals/dynamic/**' | |
jobs: | |
fetch-and-push: | |
runs-on: macos-latest | |
steps: | |
# - name: Set up environment variables | |
# run: | | |
# python3.11 -m pip install python-dotenv | |
# dotenv run env -f .env | |
- name: Checkout toxins-in-skincare repository | |
uses: actions/checkout@v3 | |
- name: Configure Git | |
run: | | |
git config --global user.name "maha.kanakala" | |
git config --global user.email "[email protected]" | |
- name: Fetch data from toxins-in-skincare repository and create data directory | |
run: | | |
mkdir -p ~/data | |
cp -R output/reports/visuals/dynamic ~/data | |
- name: Clone toxins-web repository | |
run: | | |
git clone https://github.com/mahakanakala/toxins-web.git | |
cd toxins-web | |
git config user.name "maha.kanakala" | |
git config user.email "[email protected]" | |
echo "${{ secrets.GITHUB_TOKEN }}" | git credential-osxkeychain erase | |
echo "${{ secrets.GITHUB_TOKEN }}" | git credential-osxkeychain store | |
- name: Copy data to toxins-web repository | |
run: | | |
mkdir -p ~/toxins-web/output/reports/visuals/dynamic | |
cp -R ~/data/dynamic ~/toxins-web/public/visualization/dynamic | |
- name: Commit and push changes to toxins-web repository | |
run: | | |
cd ~/toxins-web | |
git add . | |
git commit -m 'Update dynamic visualizations' | |
git push origin HEAD | |
- name: Clean up temporary data directory | |
run: rm -rf ~/data |