-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from josh-wong/add-workflow-to-sync-docs
Add workflow to sync docs to my personal site repository
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Workflow for syncing docs from this repository to the `josh-wong/josh-wong.github.io` repository | ||
name: 🔄 Sync versioned docs to my personal site repo | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- docs/** | ||
- '!docs/stylesheets/**' | ||
workflow_dispatch: | ||
# schedule: | ||
# - cron: '0 1 * * 1,4' # Run at 1:00 AM Universal Time Coordinated (UTC) / 10:00 AM Japan Standard Time (JST) on Mondays and Thursdays. | ||
|
||
jobs: | ||
docs-sync: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Push updated contents in the `docs` folder to the `josh-wong/josh-wong.github.io` repo | ||
uses: dmnemec/copy_file_to_another_repo_action@main | ||
env: | ||
API_TOKEN_GITHUB: ${{ secrets.SYNC_DOCS_PAT }} | ||
with: | ||
source_file: "docs/" | ||
destination_repo: "josh-wong/josh-wong.github.io" | ||
destination_folder: docs/passgen/ | ||
destination_branch_create: "passgen/update-docs" | ||
user_name: "josh-wong" | ||
user_email: "joshuarwong@gmail.com" | ||
commit_message: "AUTO: Sync passGen docs to personal site" | ||
use_rsync: rsync -avh |