sync source code from terminal-wiki #27
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
name: sync source code from terminal-wiki | |
on: | |
schedule: | |
- cron: '0 0 * * 1' # At 00:00 on Monday | |
workflow_dispatch: | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout wiki repository | |
uses: actions/checkout@v2 | |
with: | |
repository: charanravi-online/wiki | |
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
- name: Configure user info | |
run: | | |
git config user.email "[email protected]" | |
git config user.name "R Charan" | |
- name: Fetch changes from terminal-wiki | |
run: | | |
git remote add upstream https://github.com/charanravi-online/terminal-wiki.git || true | |
git fetch upstream | |
- name: Checkout specific folders | |
run: | | |
git checkout upstream/main -- src/ requirements.txt setup.py | |
# only the above mentioned files and folder are synced | |
- name: Commit changes | |
run: | | |
git add . | |
git commit -m "Sync the main python core application from terminal-wiki" | |
git push origin main |