Skip to content

Commit

Permalink
github worklow
Browse files Browse the repository at this point in the history
  • Loading branch information
sofiasiamp committed Dec 8, 2024
1 parent 69724cf commit 4d70c4e
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/dpe-reconstruct.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Reconstruct dpes

# Trigger workflow on push to the main branch
on:
push:
branches:
- main

# Define the job
jobs:
update_document:
runs-on: ubuntu-latest

steps:
# Step 1: Checkout the repository
- name: Checkout code
uses: actions/checkout@v4

# Step 2: Set up the programming environment (e.g., R, Python, Node.js)
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.3'

# Step 3: Install dependencies)
- name: Install R packages
run: |
Rscript -e "install.packages('dplyr')"
# Step 4: Run the code to update the document
- name: Run update script
run: |
Rscript create_mock_data/reconstructing_dpes.R
# Step 5: Commit and push the updated document
- name: Commit changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add rmonize/DPE_KARMEN_P1_test.xlsx rmonize/DPE_KARMEN_P2_test.xlsx
git commit -m "Update DPE_KARMEN_P1 and DPE_KARMEN_P2 files"
git push

0 comments on commit 4d70c4e

Please sign in to comment.