-
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.
Add workflow to update the
docs/latest
folder
Add workflow to update the `docs/latest` folder with the latest version of docs.
- 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 updating the `latest` folder to include the same content as the latest version of docs | ||
name: 🔄 Update latest version of docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- "3.12" # This path *must* match the folder name of the latest product release version. | ||
# The following `workflow_dispatch` lines are for scheduling this workflow to reduce GitHub actions. We might want to consider scheduling docs to sync to the docs site repos in the future if we use too many action minutes in our monthly GitHub quota. | ||
# 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: | ||
update-latest-version-of-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Update the `latest` folder to include the same content as the latest version of docs | ||
uses: dmnemec/copy_file_to_another_repo_action@main | ||
env: | ||
API_TOKEN_GITHUB: ${{ secrets.SYNC_DOCS_PAT }} | ||
with: | ||
source_file: "docs/3.12/" # This path *must* match the folder name of the latest version. | ||
destination_repo: "scalar-labs/docs-scalardb" # Target repo | ||
destination_folder: "docs/latest/" # Folder to sync to | ||
destination_branch_create: "scalardb/update-docs-latest" | ||
user_name: "josh-wong" | ||
user_email: "[email protected]" | ||
commit_message: "AUTO: Update the latest version of docs" | ||
use_rsync: rsync -avh |