Add push step in, now after a commit #14
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 is a start in running the makegittutorials.py script | ||
# | ||
# TODO: add run of scripts/makeGitTutorial here. Requires access to | ||
# GSASII source code (via import of GSASIIctrlGUI or could pull TutorialIndex | ||
# out for direct import here) | ||
# | ||
name: build tutorials web index | ||
#on: [push, pull_request, workflow_dispatch] | ||
#on: [push, workflow_dispatch] # why build on pull request? | ||
on: [workflow_dispatch] | ||
permissions: | ||
contents: write | ||
id-token: write | ||
jobs: | ||
create: # creates a the tutorials.html web page | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Get tutorials index from source code | ||
run: | | ||
curl -L https://github.com/AdvancedPhotonSource/GSAS-II/raw/master/GSASII/tutorialIndex.py -o scripts/tutorialIndex.py | ||
- name: build tutorials index | ||
run: | | ||
cd scripts | ||
python makeGitTutorial.py .. | ||
- name: prepare to push changes back | ||
run: | | ||
git add tutorials.html | ||
git add */index.html | ||
git status | ||
#git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
git commit -m "Changes from makeGitTutorials.py" | ||
git status | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master |