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

add template sync action to repo #146

Merged
merged 9 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
{
"login": "JessicaS11",
"name": "Jessica",
"name": "Jessica Scheick",
"avatar_url": "https://avatars.githubusercontent.com/u/11756442?v=4",
"profile": "https://github.com/JessicaS11",
"contributions": [
Expand Down
11 changes: 9 additions & 2 deletions .github/actions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ The `workflows/` subfolder contains continuous integration workflows
#### [binder-badge.yaml](../workflows/binder-badge.yaml)
Create [binder](https://mybinder.readthedocs.io/en/latest/howto/gh-actions-badges.html) badges with links to test tutorial notebooks

#### [build-website.yaml](../workflows/build-website.yaml)
Build the websites (JupyterBook and front page). Run on Pull Requests against every commit and via a 'cron' schedule to maintain caching [since otherwise the cache expires if untouched in 7 days](https://docs.github.com/en/actions/advanced-guides/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy)

#### [deploy.yaml](../workflows/deploy.yaml)
Render and publish the websites (JupyterBook and landing page) to GitHub Pages

Expand All @@ -35,8 +38,12 @@ Quality assessment and quality control. Standardizes formatting including spell
#### [repo2docker.yaml](../workflows/repo2docker.yaml)
[Build a Docker image](https://github.com/jupyterhub/repo2docker-action) for JupyterHub/BinderHub

#### [test.yaml](../workflows/test.yaml)
Build the websites (JupyterBook and front page). Run on Pull Requests against every commit and via a 'cron' schedule to maintain caching [since otherwise the cache expires if untouched in 7 days](https://docs.github.com/en/actions/advanced-guides/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy)
#### [template-sync.yaml](../workflows/template-sync.yaml)
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.


## Security

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/binder-badge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout PR
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: cache binder build on mybinder.org
uses: jupyterhub/repo2docker-action@master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Configure NASA Earthdata Login
continue-on-error: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/repo2docker-PR.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout Repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Get CalenderVersion UTC Date
id: calver
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/repo2docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout Repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Get CalenderVersion UTC Date
id: calver
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/template-sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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)
# schedule:
# - cron: "0 0 1 * *"
# manual trigger
workflow_dispatch:

jobs:
repo-sync:
runs-on: ubuntu-latest
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
permissions:
contents: write
pull-requests: write

steps:
# To use this repository's private action, you must check out the repository
- name: Checkout
uses: actions/checkout@v4
# https://github.com/actions/checkout#usage
# uncomment if you use submodules within the source repository
# with:
# submodules: true

- name: actions-template-sync
uses: AndreasAugustin/actions-template-sync@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
source_repo_path: uwhackweek/jupyterbook-template
upstream_branch: main # defaults to main
15 changes: 15 additions & 0 deletions .templatesyncignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# 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

# book files (configuration, usage-specific)
./book/_config.yml
./book/team.yaml

# event-specific tutorials
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ We've found that every hackweek benefits from a single-page website to get peopl

We've used this template for the following events:

* ICESat-2 Hackweek 2022: https://icesat-2.hackweek.io
* ICESat-2 Hackweek 2022 + 2023: https://icesat-2.hackweek.io
* SnowEx Hackweek 2021: https://snowex-hackweek.github.io/website/intro.html


Expand Down
Loading