Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the sync-template action to work #159

Merged
merged 6 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/actions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ Open a PR to update the templated repo to incorporate changes made to the
[template repo](https://github.com/uwhackweek/jupyterbook-template).
Template users should fill out the [.templatesyncignore](../../../.templatesyncignore)
to specify which files they do not want updated from the template.
Note that if you want the GitHub action and workflow files to be updated,
you will need to [create a personal access token(PAT)](https://github.com/AndreasAugustin/actions-template-sync?tab=readme-ov-file#troubleshooting).
Alternatively, you must add ".github/**" to your `.templatesyncignore` file, and your actions will not be updated.


## Security
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/template-sync.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: 'Sync to Template'
description: 'Get updates to the Jupyterbook from the template repo'

on:
# cronjob trigger (minute, hour, day, month, day-of-week; here 1st of month)
Expand All @@ -22,11 +21,14 @@ jobs:
uses: actions/checkout@v4
# https://github.com/actions/checkout#usage
# uncomment if you use submodules within the source repository
# with:
# comment token (and add .github path to .templatesyncignore)
# if you do not want actions and workflows updated
with:
# submodules: true
JessicaS11 marked this conversation as resolved.
Show resolved Hide resolved
token: ${{ secrets.GH_PAT }}

- name: actions-template-sync
uses: AndreasAugustin/actions-template-sync@v1
uses: AndreasAugustin/actions-template-sync@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
source_repo_path: uwhackweek/jupyterbook-template
Expand Down
16 changes: 9 additions & 7 deletions .templatesyncignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# THIS FILE CANNOT BE SYNCED
# use glob patterns as in .gitignore
# recommend listing non-basics tutorial directories here

###
# configuration files
cookiecutter.yaml

###
# environment lock files
./conda/*lock.yml

conda/*lock.yml
###
# team member files
team/*-*
jomey marked this conversation as resolved.
Show resolved Hide resolved
###
# book files (configuration, usage-specific)
./book/_config.yml
./book/team.yaml

book/_config.yml
###
# event-specific tutorials
Loading