Skip to content

Commit

Permalink
Add workflow to update the docs/latest folder
Browse files Browse the repository at this point in the history
Add workflow to update the `docs/latest` folder with the latest version of docs.
  • Loading branch information
josh-wong committed Feb 21, 2024
1 parent f8c99d3 commit bb4c05a
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/update-latest-docs.yml
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

0 comments on commit bb4c05a

Please sign in to comment.