Update copy-md.yml #110
Workflow file for this run
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: Copy MD Files and Create PR | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0,12 * * *' | |
push: | |
jobs: | |
sync-docs-and-create-pr: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: sync-docs-branch | |
- name: Checkout Sync-Branch | |
run: | | |
git fetch --all | |
git checkout sync-docs-branch | |
- name: Set Up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install Dependencies | |
run: | | |
yarn install --frozen-lockfile | |
- name: Run Sync Script | |
run: | | |
chmod +x sync_script.sh | |
./sync_script.sh | |
- name: Add And Commit | |
uses: EndBug/add-and-commit@v9 | |
with: | |
message: 'Update Docs' | |
- name: Push To Sync-Docs-Branch | |
uses: ad-m/github-push-action@master | |
with: | |
branch: sync-docs-branch |