Skip to content

Commit

Permalink
Update docs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
HsiangNianian authored Jul 22, 2023
1 parent a83dbee commit c6daf02
Showing 1 changed file with 26 additions and 18 deletions.
44 changes: 26 additions & 18 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,38 @@
name: Sync psi docs to HydroRoll

on:
push:
branches:
- main

jobs:
download_pages:
sync:
runs-on: ubuntu-latest

steps:
- name: Checkout HydroRoll repository
uses: actions/checkout@v2

- name: Setup Git credentials
run: |
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
- name: Checkout HydroRoll
uses: actions/checkout@v2
with:
path: HydroRoll

- name: Clone psi repository
run: git clone --depth 1 https://github.com/HydroRoll-Team/psi.git
- name: Clone psi repo
run: |
git clone https://github.com/HydroRoll-Team/psi.git
- name: Copy psi/docs/pages to HydroRoll/docs/pages/psi
run: cp -r psi/docs/pages HydroRoll/docs/pages/psi
- name: Copy psi docs to HydroRoll
run: |
mkdir -p HydroRoll/docs/pages/psi
cp -r psi/docs/pages/* HydroRoll/docs/pages/psi/
- name: Commit and push changes
run: |
cd HydroRoll
git add .
git commit -m "Update psi/docs/pages"
git push origin main
- name: Commit and push if it changed
run: |
cd HydroRoll
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -A
if git diff --quiet HEAD; then
echo "No changes to commit"
else
git commit -m "Sync psi docs"
git push
fi

0 comments on commit c6daf02

Please sign in to comment.