Skip to content

Update

Update #111

Workflow file for this run

name: Update
on:
workflow_dispatch:
schedule:
# Once a week on Saturday
- cron: '5 14 * * 6'
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup python environment
run: conda create --quiet --name rse
- name: Install Development RSE
run: |
export PATH="/usr/share/miniconda/bin:$PATH"
source activate rse
git clone https://github.com/rseng/rse
cd rse
pip install .[all]
cd ../
rm -rf rse
- name: Update Web Interface
run: |
export PATH="/usr/share/miniconda/bin:$PATH"
source activate rse
git clone https://github.com/rseng/software
cd software
rse export --type jekyll-web ../
cd ../
rm -rf software
- name: Push Changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
printf "GitHub Actor: ${GITHUB_ACTOR}\n"
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git fetch
git branch
git config --global user.name "github-actions"
git config --global user.email "github-actions@users.noreply.github.com"
git checkout main
git add _software/*
git status
if git diff-index --quiet HEAD --; then
printf "No changes\n"
else
printf "Changes\n"
git commit -a -m "Automated deployment to update software and UI $(date '+%Y-%m-%d')"
git push origin main
fi