Update README.md #24
This file contains hidden or 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: Push to Site Repo | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| update-file: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout current repo | |
| uses: actions/checkout@v3 | |
| - name: Update page to target repo | |
| run: | | |
| git clone https://x-access-token:${{ secrets.TARGET_REPO_PAT }}@github.com/dansl/dansl.github.io target-repo | |
| cp README.md target-repo/pages/linux.md | |
| cd target-repo | |
| git config user.email "139961+dansl@users.noreply.github.com" | |
| git config user.name "dansl" | |
| if ! git diff --quiet -- pages/linux.md; then | |
| git add pages/linux.md | |
| git commit -m "Update page from source repo" | |
| git push origin main | |
| else | |
| echo "No changes to commit." | |
| fi |