Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
224 commits
Select commit Hold shift + click to select a range
d1403e2
Merge pull request #1 from swcarpentry/gh-pages
ErinBecker Jan 30, 2018
c4b156f
translate CONDUCT.md
ErinBecker Feb 5, 2018
21c21ee
translate LICENSE.md
ErinBecker Feb 5, 2018
5726351
translate files
ErinBecker Feb 5, 2018
b7ba4cf
translate files
ErinBecker Feb 5, 2018
d5c0e67
translate files
ErinBecker Feb 5, 2018
0e7cafe
translate files
ErinBecker Feb 5, 2018
ad5b5b7
translate files
ErinBecker Feb 5, 2018
3b82499
translate files
ErinBecker Feb 5, 2018
feceb36
don't translate organization names
ErinBecker Feb 13, 2018
d09f7c1
Update CONDUCT.md
orchid00 Feb 20, 2018
85864b8
updated license
orchid00 Feb 20, 2018
a2b5962
Merge pull request #3 from orchid00/patch-2
ErinBecker Feb 20, 2018
6e6f4f3
Merge pull request #2 from orchid00/patch-1
ErinBecker Feb 20, 2018
418d8e0
[fix #1] bring in latest changes
fmichonneau Feb 23, 2018
84943b9
Merge pull request #2 from fmichonneau/latest-style
fmichonneau Feb 23, 2018
b2090c6
fix link referrence
fmichonneau Mar 13, 2018
f2e82c2
r reproducible
Mar 24, 2018
1d97bf2
r reproducible
Mar 24, 2018
28a7a10
r reproducible
Mar 24, 2018
4ff89a1
Merge pull request #5 from raynamharris/gh-pages
fmichonneau Mar 25, 2018
29bafe0
translate overview and teaching
Apr 4, 2018
a2f3222
change finish for Final
orchid00 Apr 11, 2018
cde1b63
Update schedule.html
PaoPrieto Apr 12, 2018
bcc8763
translate 'finish' to 'final
raynamharris Apr 13, 2018
1bc9da5
translate 'cite' to 'cita'
raynamharris Apr 13, 2018
d597cc2
Merge pull request #9 from raynamharris/patch-1
fmichonneau Apr 13, 2018
e48f14b
Merge pull request #10 from raynamharris/patch-2
fmichonneau Apr 13, 2018
1282bdf
Merge pull request #8 from PaoPrieto/patch-1
fmichonneau Apr 13, 2018
b708d2e
Merge pull request #7 from orchid00/patch-1
fmichonneau Apr 13, 2018
569f761
Merge pull request #6 from raynamharris/gh-pages
fmichonneau Apr 13, 2018
711dc0b
merge styles v9.5.2
fmichonneau Jun 19, 2018
555226b
Merge pull request #12 from carpentries/update-styles-v9.5.2
fmichonneau Jun 20, 2018
6745809
Update navbar.html
raynamharris Jul 6, 2018
9b3d46a
mejore -> mejora
raynamharris Nov 15, 2018
a7566a9
Merge pull request #13 from raynamharris/patch-3
rgaiacs Dec 3, 2018
b11b6d1
repo_check.py: allow URLs not ending with .git (#482)
maxim-belkin Aug 5, 2020
115a735
Makefile: fix comment in front of `lesson-check` (#481)
maxim-belkin Aug 5, 2020
a331232
repo_check.py: match https repositories (#483)
maxim-belkin Aug 5, 2020
b12821e
Makefile: don't use /bin/bash shell (#484)
maxim-belkin Aug 7, 2020
790278e
[fix carpentries/styles#477] rewrite travis script
fmichonneau Aug 7, 2020
d3aa582
add vendor folder to gitignore and _config.yml
fmichonneau Aug 7, 2020
6861f75
OS stripe: adjust line height (#490)
maxim-belkin Aug 11, 2020
95221b1
Makefile: fix 'lesson-fixme' target for Windows (#486)
maxim-belkin Aug 11, 2020
52597a5
Fix Python scripts for Windows: UTF-8 encoding (#485)
maxim-belkin Aug 11, 2020
70213c3
only display Episodes drop-down if we have episodes to show (#491)
fmichonneau Aug 11, 2020
32e788b
fix variable name
fmichonneau Aug 13, 2020
bcb686d
GitHub Actions: check lesson template (#489)
maxim-belkin Aug 14, 2020
61db2b1
fix: tighten definitions of highlighter (#496)
henryiii Aug 19, 2020
33c71b1
add three more common languages (#497)
henryiii Aug 19, 2020
41d0e9a
remove unused code highlight classes (#498)
fmichonneau Aug 20, 2020
c1e8856
Sync styles first (#494)
fmichonneau Aug 22, 2020
99ecdf4
GitHub Actions: website (#488)
maxim-belkin Aug 25, 2020
6639d4b
GitHub Actions: better workflow and job names (#500)
maxim-belkin Aug 25, 2020
a8eee52
GitHub Action: website.yml: don't run in forks (#501)
maxim-belkin Sep 2, 2020
b11ce7f
GH Website action: rename + don't use lesson directory (#504)
maxim-belkin Sep 21, 2020
482c223
lesson.scss: styling for DIVs for embedding Youtube videos (#503)
maxim-belkin Sep 21, 2020
f53be37
update link to discuss mailing list (#507)
tobyhodges Oct 8, 2020
53e9913
add default repository to install_required_packages() (#509)
zkamvar Oct 19, 2020
2c6b97e
Merge branch 'gh-pages' of github.com:carpentries/styles into gh-pages
fmichonneau Oct 20, 2020
11db6b0
add warning blockquote
fmichonneau Oct 7, 2020
f5940d9
Revert "Merge branch 'gh-pages' of github.com:carpentries/styles into…
fmichonneau Oct 20, 2020
efa2cc9
add warning code block
fmichonneau Oct 20, 2020
207d649
update expected reference filename (#508)
tobyhodges Oct 21, 2020
5b906e7
lesson.scss: no borders around unrecognized code (#510)
maxim-belkin Oct 22, 2020
462be1e
bump ruby version (as specified in github-pages v209)
fmichonneau Oct 28, 2020
941da2b
drop patch version, fix at v1
fmichonneau Oct 28, 2020
c97dc12
removing contractions from CONTRIBUTING (#512)
ChristinaLK Nov 2, 2020
1d32319
add image-with-shadow class
tobyhodges Nov 5, 2020
209797f
_config.yml: mention Carpentries Incubator
maxim-belkin Nov 5, 2020
c4b6e23
Matlab -> MATLAB
tobyhodges Nov 9, 2020
ca16e0b
set CRAN url if default is "@CRAN@"
zkamvar Dec 2, 2020
32ab0d1
Fix Ruby style
maxim-belkin Nov 24, 2020
fdb264a
accept any base filename for Rmd episodes
tobyhodges Dec 8, 2020
ce79a4b
run R-based lessons in forks
zkamvar Dec 7, 2020
423bf57
add control structure
zkamvar Dec 7, 2020
d8f93f0
404 page for better learner experience
maxim-belkin Nov 24, 2020
2b523bc
lesson.scss: wildcard selectors for code blocks
maxim-belkin Nov 20, 2020
3efe669
Ignore .jekyll-metatada
klieret Dec 17, 2020
da99378
Speed up builds of R-based lessons
zkamvar Dec 17, 2020
a60a74a
No need for User Agent string
zkamvar Dec 17, 2020
7fd7d18
permissive checks for pre-alpha lessons
zkamvar Dec 18, 2020
9e641fd
bin/lesson_check.py: allow 'language-*' code blocks (#532)
tobyhodges Dec 21, 2020
acdbd1c
bin/lesson_check.py: allow 'caution' blockquote
maxim-belkin Dec 22, 2020
16e571e
Merge pull request #537 from maxim-belkin/caution-blockquote
zkamvar Dec 22, 2020
3d5f6b5
avoid ansi color characters from being printed
zkamvar Jan 6, 2021
627d1a1
deploy from "website" action
fmichonneau Dec 18, 2020
afb88e2
deploy R-based lessons without using another action
fmichonneau Dec 18, 2020
08e26e6
also delete _site
fmichonneau Dec 18, 2020
70e3484
include @zkamvar suggestions
fmichonneau Jan 6, 2021
951140e
pin ubuntu version to 20.04 (#540)
fmichonneau Jan 8, 2021
2cd3c9c
GitHub Actions: cache required R packages (#534)
fmichonneau Jan 8, 2021
c92e47c
add missing parenthesis
fmichonneau Jan 8, 2021
bfd8c00
Add incubator option for carpentry field. (#542)
tkphd Jan 11, 2021
740773a
.editorconfig: don't trim trailing spaces in markdown
unode Jan 27, 2021
5bc7724
lesson.scss: HTML block
maxim-belkin Jan 27, 2021
d021e1f
add patch to clean gh-pages before committing (#545)
zkamvar Feb 10, 2021
f419f9c
Fix Kramdown parser crash
maxim-belkin Feb 15, 2021
ec29c6b
Merge pull request #546 from maxim-belkin/fix543
zkamvar Feb 16, 2021
2a550c7
bin/util.py: Change ruby executable to "bundle exec ruby"
reid-a Feb 22, 2021
a4e53f9
Change link colours (#549)
baileythegreen Feb 22, 2021
03fb1a0
bin/workshop_check.py: update default contact email address
tobyhodges Mar 4, 2021
a841a56
Gemfile: add 'webrick' dependency for Ruby 3.0.0 and above
josephmje Mar 5, 2021
32f7bd1
lesson_check.py allow for missing life_cycle
zkamvar Mar 10, 2021
b2f42c2
update with Maxim's suggestion
zkamvar Mar 10, 2021
a283c4b
Merge pull request #557 from zkamvar/znk-fix-556
zkamvar Mar 10, 2021
0554a8d
Add catch for None type code block in lesson_check
zkamvar Mar 11, 2021
cce6a66
fix syntax
zkamvar Mar 11, 2021
091d31a
Merge pull request #558 from zkamvar/znk-fix-550
zkamvar Mar 11, 2021
905d24a
Makefile: fix 'bundle config' command flags
maxim-belkin Mar 16, 2021
4e81182
Merge pull request #559 from maxim-belkin/bundle-config-fix
zkamvar Mar 17, 2021
b43257a
Makefile: clean target: remove .vendor, .bundle, Gemfile.lock
maxim-belkin Mar 18, 2021
39a32f6
Makefile: silence Docker commands
maxim-belkin Mar 18, 2021
588f2af
Merge pull request #561 from maxim-belkin/silence-docker-commands
zkamvar Mar 18, 2021
ed77eda
use Ruby's official GH Actions
fmichonneau Mar 19, 2021
b46187f
Makefile: use SHELL to call bin/knit_lesson.sh
maxim-belkin Mar 19, 2021
b1ca20a
Makefile: fix up PHONY targets
maxim-belkin Mar 19, 2021
943c8d9
Fix GitHub actions for lessons in Rmarkdown
maxim-belkin Mar 19, 2021
13d218a
Merge pull request #565 from maxim-belkin/attempt-to-fix-r-on-windows
zkamvar Mar 19, 2021
625c55e
Merge pull request #563 from maxim-belkin/phony-targets
zkamvar Mar 19, 2021
d6c86ba
Merge branch 'gh-pages' into image-with-shadow-class
tobyhodges Mar 22, 2021
4df32a8
apply single shadow to image class
tobyhodges Mar 22, 2021
93dfc15
use grey shadow instead of transparent black
tobyhodges Mar 22, 2021
4b20368
expand image-with-shadow selection
tobyhodges Mar 23, 2021
d0c90ee
Merge pull request carpentries/styles#514
maxim-belkin Mar 23, 2021
5a010ab
Makefile: don't fail when Python isn't found
maxim-belkin Mar 23, 2021
50fd61f
Merge pull request carpentries/styles#566
maxim-belkin Mar 24, 2021
1bad008
bin/dependencies.R: handle 'no packages were specified' error
maxim-belkin Mar 27, 2021
4b3d44a
Merge pull request #567 from maxim-belkin/no-missing-dependencies
zkamvar Mar 29, 2021
4df5052
Don't check links.md in lessons that use remote theme
maxim-belkin Apr 14, 2021
9a73007
add link references to code_of_conduct.md (#572)
tobyhodges Apr 14, 2021
ced2244
Update links.md
alanocallaghan Apr 15, 2021
72d2b85
Merge pull request #575 from Alanocallaghan/patch-1
zkamvar Apr 15, 2021
494e2d6
add source_dir argument
zkamvar Apr 15, 2021
efe8c04
lesson_check.py: add 'source_dir' as an argument to using_remote_theme()
maxim-belkin Apr 15, 2021
01fa7e6
Improved relative_root_path
maxim-belkin Apr 16, 2021
8541f28
update contributing guide
tobyhodges Apr 17, 2021
4a9721d
Merge pull request #579 from tobyhodges/patch-8
zkamvar Apr 17, 2021
a56a34e
add further languages for box titles (#580)
bkmgit Apr 20, 2021
6ce5c22
Merge pull request #578 from maxim-belkin/fix-404
zkamvar Apr 20, 2021
0c92757
bin/lesson_check.py: allow comments and empty lines in links.md
maxim-belkin Apr 21, 2021
7e94928
bin/lesson_check.py: one more fix for using_remote_theme()
maxim-belkin Apr 22, 2021
14ca369
Merge pull request #585 from maxim-belkin/one-last-fix
zkamvar Apr 23, 2021
ac0a2bf
Template workflow: add two more lessons
maxim-belkin Apr 21, 2021
091ecf7
add make lesson-check-all step
zkamvar Apr 22, 2021
902705d
Set working directory for the 'make site' step
maxim-belkin Apr 22, 2021
97c32b9
Merge pull request #584 from maxim-belkin/add-two-more-lessons
zkamvar Apr 23, 2021
d3f553d
Template workflow: smarter syncing with the styles repo
maxim-belkin Apr 21, 2021
db953ba
Apply Zhian's suggestions
maxim-belkin Apr 23, 2021
2abba21
Merge pull request #583 from maxim-belkin/better-syncing
zkamvar Apr 23, 2021
973177e
add math support with katex (#573)
alanocallaghan Apr 27, 2021
456c214
bin/util.py: remove unused 'IMAGE_FILE_SUFFIX' var (#590)
maxim-belkin Apr 30, 2021
6d5b41e
Merge pull request carpentries/styles#582
maxim-belkin May 6, 2021
d3e11ab
bin/lesson_check.py: use proper function
maxim-belkin May 6, 2021
5e32b18
Merge pull request carpentries/styles#593
maxim-belkin May 6, 2021
0f1cec8
bin/lesson_check.py: allow exceptions to line length limit
maxim-belkin May 6, 2021
c82a669
Merge pull request carpentries/styles#594
maxim-belkin May 6, 2021
5b9bff4
lesson_check.py: harden single-line image/link pattern
maxim-belkin May 9, 2021
af7efa5
Merge pull request carpentries/styles#597
maxim-belkin May 9, 2021
a927169
lesson_check.py: relax P_LINK_IMAGE_LINE pattern
maxim-belkin May 11, 2021
ba5acb9
Merge pull request carpentries/styles#599
maxim-belkin May 12, 2021
ea9b44c
bin/util.py: Factor out reporter class. Define __all__
maxim-belkin May 7, 2021
4afcce8
Don't force hostname into relative_root_path
unode May 14, 2021
9448b99
Merge pull request carpentries/styles#601
maxim-belkin May 15, 2021
5e8d059
lesson_check.py: add a comment about importing * from a package
maxim-belkin May 19, 2021
0ff1e35
Merge pull request #596 from maxim-belkin/reporter
zkamvar May 19, 2021
4c415a9
lesson.scss: define 'inline' class for images
maxim-belkin May 19, 2021
5919530
Fix Reporter class imports
maxim-belkin May 20, 2021
51c88fe
Merge pull request carpentries/styles#603
maxim-belkin May 20, 2021
e1f7f91
Merge pull request carpentries/styles#602
maxim-belkin May 20, 2021
da77111
update R dependency search; Allow Bioconductor packages (#600)
zkamvar May 21, 2021
929c1a7
Automatically add deep anchor links using AnchorJS
maxim-belkin Jun 5, 2021
243208b
Merge pull request carpentries/styles#606
maxim-belkin Jun 10, 2021
b33336b
Makefile: require index.md (#607)
maxim-belkin Jun 24, 2021
d222b47
Makefile: docker-serve target: ensure Docker is installed (#608)
maxim-belkin Jun 25, 2021
9d1442f
Fix broken "How to contribute" link
kekoziar Jul 3, 2021
6b49768
Merge pull request carpentries/styles#610
maxim-belkin Jul 3, 2021
a7d50e1
lesson_check.py: report check status at the end
maxim-belkin Jul 9, 2021
2735d4e
util.py: load_yaml: Don't fail when it's not necessary
maxim-belkin Jul 9, 2021
8498d31
lesson_check.py: fix error message for the 'defaults' check
maxim-belkin Jul 9, 2021
19dc8e3
lesson_check.py: use proper regex for matching episode files
maxim-belkin Jul 10, 2021
7634a8c
Merge pull request carpentries/styles#612
maxim-belkin Jul 12, 2021
092e5c9
Merge pull request carpentries/styles#613
maxim-belkin Jul 12, 2021
d0aceb3
Merge pull request carpentries/styles#614
maxim-belkin Jul 12, 2021
14d7356
Merge pull request carpentries/styles#615
maxim-belkin Jul 12, 2021
e3808e8
lesson-check.py: read `config.yml` only once
maxim-belkin Jul 12, 2021
e1b4838
Merge pull request carpentries/styles#616
maxim-belkin Jul 13, 2021
1019f12
404.md: expand contractions (#620)
maxim-belkin Jul 20, 2021
5237285
Syllabus: add conditional intructor training pre-/post- surveys (#618)
maxim-belkin Jul 20, 2021
674025c
Navigation bar: allow excluding extras (#617)
maxim-belkin Jul 20, 2021
332145f
add styling for lesson in The Carpentries Lab
fmichonneau Jul 22, 2021
69f1d0a
remove contractions
fmichonneau Sep 3, 2021
1632471
remove contraction
fmichonneau Sep 3, 2021
e867adf
remove contraction
fmichonneau Sep 3, 2021
4424121
remove funding file to use organization's
fmichonneau Sep 9, 2021
811d30e
remove travis
fmichonneau Sep 9, 2021
cf805b3
switch to using typeform for instructor training
fmichonneau Sep 15, 2021
25a5b9f
switch analytics to using matomo
fmichonneau Oct 6, 2021
2a9f189
update text in License to reflect new trademarks
fmichonneau Oct 6, 2021
ca35a7c
Show solution while printing lessons
ashwinvis Oct 8, 2021
6f49049
add librarycarpentry.org to matomo settings
fmichonneau Oct 13, 2021
85f39ff
change address
brownsarahm Jan 21, 2022
8f6a08c
Merge pull request #635 from carpentries/brownsarahm-patch-1
zkamvar Jan 21, 2022
74d1c06
Use a pixelated rendering instead of default blur
unode Feb 21, 2022
1322a26
Add comment to explain pixelated rendering CSS setting
unode Feb 21, 2022
106e502
add link to CoC
fmichonneau Mar 30, 2022
2a6d585
add new steps to transition lessons to Workbench
fmichonneau Apr 4, 2022
cb78403
add .ruby-version so rbenv can detect the version used by GH pages
fmichonneau Apr 5, 2022
9be301d
Revert "add .ruby-version so rbenv can detect the version used by GH …
fmichonneau Apr 5, 2022
364ede5
use kebab case for transition step variable name
fmichonneau Apr 18, 2022
e6aed98
better messages, fix typos
fmichonneau Apr 18, 2022
bd9f274
change px to em
zkamvar Nov 8, 2021
078eec5
Merge pull request #637 from fmichonneau/add-transition
zkamvar Oct 5, 2022
6c743e1
modify transition workflow/variables
zkamvar Oct 5, 2022
897fed0
add workbench link
zkamvar Oct 5, 2022
07553b2
no need for transition_url (theoretically)
zkamvar Oct 5, 2022
6b8bbad
Merge pull request #639 from carpentries/update-transition-workflow
zkamvar Oct 14, 2022
036a455
use up-to-date r-lib action
zkamvar Oct 20, 2022
fe10a72
switch to new output command
zkamvar Oct 20, 2022
b31b489
Merge pull request #643 from carpentries/fix-workflows-641
zkamvar Oct 20, 2022
1074f52
update beta phase target
zkamvar Oct 24, 2022
95daee2
Merge pull request #644 from carpentries/update-beta-targets
zkamvar Oct 24, 2022
7bcdf50
add id to lifecycle
zkamvar Nov 28, 2022
0cac5d3
update to final version of styles
tobyhodges Apr 17, 2023
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
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ trim_trailing_whitespace = true
indent_size = 2
indent_style = space
max_line_length = 100 # Please keep this in sync with bin/lesson_check.py!
trim_trailing_whitespace = false # keep trailing spaces in markdown - 2+ spaces are translated to a hard break (<br/>)

[*.r]
max_line_length = 80
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Thanks for contributing! :heart:

If this contribution is for instructor training, please email the link to this contribution to
checkout@carpentries.org so we can record your progress. You've completed your contribution
instructor.training@carpentries.org so we can record your progress. You've completed your contribution
step for instructor checkout by submitting this contribution!

Keep in mind that **lesson maintainers are volunteers** and it may take them some time to
Expand Down
185 changes: 185 additions & 0 deletions .github/workflows/template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
name: Test template
on:
push:
branches: gh-pages
pull_request:
jobs:
check-template:
name: ${{ matrix.lesson-name }} (${{ matrix.os-name }})
if: github.repository == 'carpentries/styles'
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
lesson: [swcarpentry/shell-novice, datacarpentry/r-intro-geospatial, librarycarpentry/lc-git]
os: [ubuntu-20.04, macos-latest, windows-latest]
experimental: [false]
include:
- os: ubuntu-20.04
os-name: Linux
- os: macos-latest
os-name: macOS
- os: windows-latest
os-name: Windows
- lesson: swcarpentry/shell-novice
lesson-name: (SWC) Shell novice
- lesson: datacarpentry/r-intro-geospatial
lesson-name: (DC) R Intro Geospatial
- lesson: librarycarpentry/lc-git
lesson-name: (LC) Intro to Git
- lesson: datacarpentry/astronomy-python
lesson-name: (DC) Foundations of Astronomical Data Science
experimental: true
os: ubuntu-20.04
os-name: Linux
- lesson: carpentries/lesson-example
lesson-name: (CP) Lesson Example
experimental: false
os: ubuntu-20.04
os-name: Linux
defaults:
run:
shell: bash # forces 'Git for Windows' on Windows
env:
RSPM: 'https://packagemanager.rstudio.com/cran/__linux__/focal/latest'
steps:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install GitHub Pages, Bundler, and kramdown gems
run: |
gem install github-pages bundler kramdown kramdown-parser-gfm

- name: Install Python modules
run: |
if [[ $RUNNER_OS == macOS || $RUNNER_OS == Linux ]]; then
python3 -m pip install --upgrade pip setuptools wheel pyyaml==5.3.1 requests
elif [[ $RUNNER_OS == Windows ]]; then
python -m pip install --upgrade pip setuptools wheel pyyaml==5.3.1 requests
fi

- name: Checkout the ${{ matrix.lesson }} lesson
uses: actions/checkout@master
with:
repository: ${{ matrix.lesson }}
path: lesson
fetch-depth: 0

- name: Sync lesson with carpentries/styles
working-directory: lesson
run: |
echo "::group::Fetch Styles"
if [[ -n "${{ github.event.pull_request.number }}" ]]
then
ref="refs/pull/${{ github.event.pull_request.number }}/head"
else
ref="gh-pages"
fi

git config --global user.email "team@carpentries.org"
git config --global user.name "The Carpentries Bot"

git remote add styles https://github.com/carpentries/styles.git
git fetch styles $ref:styles-ref
echo "::endgroup::"
echo "::group::Synchronize Styles"
# Sync up only if necessary
if [[ $(git rev-list --count HEAD..styles-ref) != 0 ]]
then

# The merge command below might fail for lessons that use remote theme
# https://github.com/carpentries/carpentries-theme
echo "Testing merge using recursive strategy, accepting upstream changes without committing"
if ! git merge -s recursive -Xtheirs --no-commit styles-ref
then

# Remove "deleted by us, unmerged" files from the staging area.
# these are the files that were removed from the lesson
# but are still present in the carpentries/styles repo
echo "Removing previously deleted files"
git rm $(git diff --name-only --diff-filter=DU)

# If there are still "unmerged" files,
# let's raise an error and look into this more closely
if [[ -n $(git diff --name-only --diff-filter=U) ]]
then
echo "There were unmerged files in ${{ matrix.lesson-name }}:"
echo "$(git diff --compact-summary --diff-filter=U)"
exit 1
fi
fi

echo "Committing changes"
git commit -m "Sync lesson with carpentries/styles"
fi
echo "::endgroup::"

- name: Look for R-markdown files
id: check-rmd
working-directory: lesson
run: |
echo "count=$(shopt -s nullglob; files=($(find . -iname '*.Rmd')); echo ${#files[@]})" >> $GITHUB_OUTPUT

- name: Set up R
if: steps.check-rmd.outputs.count != 0
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
install-r: false

- name: Install needed packages
if: steps.check-rmd.outputs.count != 0
working-directory: lesson
run: |
source('bin/dependencies.R')
install_required_packages(.libPaths()[1])
shell: Rscript {0}

- name: Query dependencies
if: steps.check-rmd.outputs.count != 0
working-directory: lesson
run: |
source('bin/dependencies.R')
deps <- identify_dependencies()
create_description(deps)
use_bioc_repos()
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Restore Package Cache
if: runner.os != 'Windows' && steps.check-rmd.outputs.count != 0
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install stringi from source
if: runner.os == 'Linux' && steps.check-rmd.outputs.count != 0
run: install.packages('stringi', repos='https://cloud.r-project.org')
shell: Rscript {0}

- name: Install system dependencies for R packages
if: runner.os == 'Linux' && steps.check-rmd.outputs.count != 0
working-directory: lesson
run: |
while read -r cmd
do
eval sudo $cmd || echo "Nothing to update"
done < <(Rscript -e 'cat(remotes::system_requirements("ubuntu", "20.04"), sep = "\n")')

- run: make site
working-directory: lesson

- run: make lesson-check-all
working-directory: lesson
123 changes: 123 additions & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: Website
on:
push:
branches:
- gh-pages
- main
pull_request: []
jobs:
build-website:
if: ${{ !endsWith(github.repository, '/styles') }}
runs-on: ubuntu-20.04
env:
RSPM: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
defaults:
run:
shell: bash
steps:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install GitHub Pages, Bundler, and kramdown gems
run: |
gem install github-pages bundler kramdown kramdown-parser-gfm

- name: Install Python modules
run: |
python3 -m pip install --upgrade pip setuptools wheel pyyaml==5.3.1 requests

- name: Checkout the lesson
uses: actions/checkout@master
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Look for R-markdown files
id: check-rmd
run: |
echo "count=$(shopt -s nullglob; files=($(find . -iname '*.Rmd')); echo ${#files[@]})" >> $GITHUB_OUTPUT

- name: Set up R
if: steps.check-rmd.outputs.count != 0
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
install-r: false

- name: Restore R Cache
if: steps.check-rmd.outputs.count != 0
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install needed packages
if: steps.check-rmd.outputs.count != 0
run: |
source('bin/dependencies.R')
install_required_packages()
shell: Rscript {0}

- name: Query dependencies
if: steps.check-rmd.outputs.count != 0
run: |
source('bin/dependencies.R')
deps <- identify_dependencies()
create_description(deps)
use_bioc_repos()
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}


- name: Install system dependencies for R packages
if: steps.check-rmd.outputs.count != 0
run: |
while read -r cmd
do
eval sudo $cmd || echo "Nothing to update"
done < <(Rscript -e 'cat(remotes::system_requirements("ubuntu", "20.04"), sep = "\n")')

- name: Render the markdown and confirm that the site can be built
run: make site

- name: Checkout github pages
if: ${{ github.event_name == 'push' && steps.check-rmd.outputs.count != 0 && github.ref != 'refs/heads/gh-pages'}}
uses: actions/checkout@master
with:
ref: gh-pages
path: gh-pages

- name: Commit and Push
if: ${{ github.event_name == 'push' && steps.check-rmd.outputs.count != 0 && github.ref != 'refs/heads/gh-pages'}}
run: |
# clean up gh-pages
cd gh-pages
git rm -rf . # remove all previous files
git restore --staged . # remove things from the stage
cd ..
# copy everything into gh-pages site
cp -r `ls -A | grep -v 'gh-pages' | grep -v '.git' | grep -v '.bundle/' | grep -v '_site'` gh-pages
# move into gh-pages, add, commit, and push
cd gh-pages
# setup git
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
git add -A .
git commit --allow-empty -m "[Github Actions] render website (via ${{ github.sha }})"
git push origin gh-pages
# return
cd ..

- run: make lesson-check-all
if: always()
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
.ipynb_checkpoints
.sass-cache
.jekyll-cache/
.jekyll-metadata
__pycache__
_site
.Rproj.user
.Rhistory
.RData
.bundle/
.vendor/
vendor/
.docker-vendor/
Gemfile.lock
.*history
25 changes: 25 additions & 0 deletions 404.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
layout: base
root: .
permalink: 404.html
title: "Page not found"
---

# Oops! We cannot find that page.
{: style="text-align: center;"}

> ## Our apologies!
>
> We cannot seem to find the page you are looking for.
> Try going back to the <a href="javascript:history.back()">previous page</a> or
> navigate to any other page using the navigation bar above
> {%- if site.kind == "lesson" -%} or the schedule below {%- endif -%}.
> If you got here by clicking on a link in the
> {%- if site.kind == "lesson" -%} lesson {%- else -%} workshop {%- endif -%},
> please report this link to the
> {%- if site.kind == "lesson" -%} lesson developers {%- else -%} workshop organizers {%- endif -%}.
{: .caution}

{% if site.kind == "lesson" %}
{% include syllabus.html %}
{% endif%}
3 changes: 2 additions & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ we pledge to follow the [Carpentry Code of Conduct][coc].
Instances of abusive, harassing, or otherwise unacceptable behavior
may be reported by following our [reporting guidelines][coc-reporting].

{% include links.md %}
[coc]: https://docs.carpentries.org/topic_folders/policies/code-of-conduct.html
[coc-reporting]: https://docs.carpentries.org/topic_folders/policies/incident-reporting.html
8 changes: 6 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@

source 'https://rubygems.org'

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }

# Synchronize with https://pages.github.com/versions
ruby '>=2.5.8'
ruby '>=2.7.1'

gem 'github-pages', group: :jekyll_plugins

if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.0.0')
gem 'webrick', '>= 1.6.1'
end
Loading