Skip to content

Commit

Permalink
Merge pull request #3 from josh-wong/add-workflow-to-sync-docs
Browse files Browse the repository at this point in the history
Add workflow to sync docs to my personal site repository
  • Loading branch information
josh-wong authored May 18, 2024
2 parents 077dcfd + ff9fce9 commit 6613ad9
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/sync-docs.yml
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

0 comments on commit 6613ad9

Please sign in to comment.