1
0
mirror of synced 2026-01-06 06:02:35 -05:00
Files
docs/.github/workflows/site-policy-sync.yml
Peter Cihon 160085a9ec Update site-policy-sync.yml (#17256)
Added filter to reduce trigger events. Edited destination branch and commit message.

Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
2021-01-14 14:54:33 +00:00

43 lines
1.5 KiB
YAML

name: site-policy-sync
# Controls when the action will run.
on:
# Triggers the workflow pull requests merged to the main branch
pull_request:
branches:
- main
types:
- closed
paths:
- 'content/github/site-policy/**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
copy-file:
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
# Pushes to other repo
- name: Push folder to another repository
uses: crykn/copy_folder_to_another_repo_action@abc264e1c16eb3d7b1f7763bfdb0e1699ad43120
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_SITEPOLICY }}
with:
source_folder: 'content/github/site-policy'
destination_repo: 'github/site-policy'
destination_branch: 'repo-sync'
destination_folder: 'Policies'
user_email: 'pcihon@users.noreply.github.com'
user_name: 'pcihon'
commit_msg: 'Automatic sync from GitHub Docs.'