Skip to content

Commit 0e7395d

Browse files
committed
feat: initial add
1 parent ddb650f commit 0e7395d

File tree

292 files changed

+23461
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

292 files changed

+23461
-1
lines changed

.github/workflows/cicd.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI/CD
2+
3+
on: push
4+
5+
jobs:
6+
build-site:
7+
name: Build Site
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: write
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
with:
15+
submodules: true
16+
fetch-depth: 0
17+
18+
- name: Setup Hugo
19+
uses: peaceiris/actions-hugo@v3
20+
with:
21+
hugo-version: 'latest'
22+
extended: true
23+
24+
- name: Build
25+
run: |
26+
# make the assets tgz users need to bootstrap the workshop
27+
make workshop-assets
28+
29+
# there is no built-in env variable for the repo name without owner, so we have to parse it out
30+
REPO_NAME=$(echo "${GITHUB_REPOSITORY}" | cut -d'/' -f2)
31+
hugo --minify -b "https://${GITHUB_REPOSITORY_OWNER}.github.io/$REPO_NAME/"
32+
33+
- name: Deploy
34+
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/init'
35+
uses: peaceiris/actions-gh-pages@v3
36+
with:
37+
github_token: ${{ secrets.GITHUB_TOKEN }}
38+
publish_dir: ./public

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/resources/
2+
/public/
3+
/.hugo_build.lock
4+
hugo-assets.tgz
5+
workshop-assets.tgz
6+
/hugo
7+
*-autosave.kra
8+
*~

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "themes/hugo-book"]
2+
path = themes/hugo-book
3+
url = https://github.com/alex-shpak/hugo-book

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Carson Anderson
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.PHONY: workshop-assets
2+
workshop-assets:
3+
tar -zcvf workshop-assets.tgz config.toml content layouts LICENSE static themes assets .gitignore .gitmodules Makefile README.md
4+
mv workshop-assets.tgz static/workshop-assets.tgz
5+
6+
.PHONY: install-hugo-codespace
7+
install-hugo-codespace:
8+
curl -L https://github.com/gohugoio/hugo/releases/download/v0.154.0/hugo_extended_0.145.0_linux-amd64.tar.gz | tar -zxv hugo

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1-
# workshop-learn-github-actions
1+
# Workshop: Learn GitHub Actions
2+
3+
You can develop or run this site locally using [`hugo`](https://gohugo.io/installation/)
4+
5+
> Be sure you install the `extended` or `extended_withdeployment` version of hugo.
6+
7+
```bash
8+
git submodule update --init --recursive
9+
hugo server --disableFastRender
10+
```
11+
12+
Then open http://localhost:1313/workshop-learn-github-actions/

assets/_custom.scss

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/* You can add custom styles here. */
2+
3+
// @import "plugins/numbered";
4+
// @import "plugins/scrollbars";
5+
6+
.pagebreak {
7+
margin: 20em;
8+
height: 90vh;
9+
margin: auto auto;
10+
}
11+
12+
@media print {
13+
.pagebreak {
14+
page-break-after: always;
15+
}
16+
}
17+
18+
// make all slide headings have equal size and height regardless
19+
// of heading size, so the buttons don't move
20+
// we still use different headings so the ToC is correct
21+
// but all slides should feel the same
22+
.slides > article > h1,h2,h3,h4,h5,h6 {
23+
height: 35pt;
24+
margin: 0;
25+
font-size: larger;
26+
font-weight: bolder !important;
27+
}
28+
29+
// Give article headings after page breaks some space
30+
.pagebreak > h1,h2,h3,h4,h5,h6 {
31+
padding-top: 2vh;
32+
}
33+
34+
.language-bash {
35+
font-size: x-large;
36+
}
37+
38+
p.mermaid {
39+
background-color: ghostwhite;
40+
}
41+
42+
details {
43+
margin-bottom: 1em;
44+
}

config.toml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
baseURL = 'http://localhost/workshop-learn-github-actions/'
2+
languageCode = 'en-us'
3+
title = 'Learn GitHub Actions'
4+
theme = 'hugo-book'
5+
6+
# Book configuration
7+
disablePathToLower = false
8+
enableGitInfo = false
9+
canonifyURL = true
10+
11+
# Needed for mermaid/katex shortcodes
12+
[markup]
13+
14+
# [markup.highlight]
15+
# noClasses = false
16+
17+
[markup.goldmark.renderer]
18+
unsafe = true
19+
20+
[markup.tableOfContents]
21+
startLevel = 2
22+
endLevel = 5
23+
24+
# [menu]
25+
# # [[menu.before]]
26+
# [[menu.after]]
27+
# name = "Github"
28+
# url = "https://github.com/alex-shpak/hugo-book"
29+
# weight = 10
30+
31+
# [[menu.after]]
32+
# name = "Hugo Themes"
33+
# url = "https://themes.gohugo.io/hugo-book/"
34+
# weight = 20
35+
36+
[params]
37+
# Add a name or alias to this list as you go through the workshop.
38+
Authors = [
39+
"Carson Anderson"
40+
"Cole Olsen"
41+
]
42+
43+
# (Optional, default light) Sets color theme: light, dark or auto.
44+
# Theme 'auto' switches between dark and light modes based on browser/os preferences
45+
BookTheme = 'dark'
46+
47+
# (Optional, default none) Set the path to a logo for the book. If the logo is
48+
# /static/logo.png then the path would be logo.png
49+
# BookLogo = 'logo.png'
50+
51+
# (Optional, default none) Set leaf bundle to render as side menu
52+
# When not specified file structure and weights will be used
53+
# BookMenuBundle = '/menu'
54+
55+
# (Optional, default docs) Specify root page to render child pages as menu.
56+
# Page is resoled by .GetPage function: https://gohugo.io/functions/getpage/
57+
# For backward compatibility you can set '*' to render all sections to menu. Acts same as '/'
58+
BookSection = '/'
59+
60+
# Set source repository location.
61+
# Used for 'Last Modified' and 'Edit this page' links.
62+
BookRepo = 'https://github.com/carsonoid/workshop-guts-of-git'
63+
64+
# # (Optional, default 'commit') Specifies commit portion of the link to the page's last modified
65+
# # commit hash for 'doc' page type.
66+
# # Requires 'BookRepo' param.
67+
# # Value used to construct a URL consisting of BookRepo/BookCommitPath/<commit-hash>
68+
# # Github uses 'commit', Bitbucket uses 'commits'
69+
# # BookCommitPath = 'commit'
70+
71+
# # Enable "Edit this page" links for 'doc' page type.
72+
# # Disabled by default. Uncomment to enable. Requires 'BookRepo' param.
73+
# # Edit path must point to root directory of repo.
74+
# BookEditPath = 'edit/main/exampleSite'
75+
76+
# Configure the date format used on the pages
77+
# - In git information
78+
# - In blog posts
79+
BookDateFormat = 'January 2, 2006'
80+
81+
# (Optional, default true) Enables search function with flexsearch,
82+
# Index is built on fly, therefore it might slowdown your website.
83+
# Configuration for indexing can be adjusted in i18n folder per language.
84+
BookSearch = false
85+
86+
# # (Optional, default true) Enables comments template on pages
87+
# # By default partals/docs/comments.html includes Disqus template
88+
# # See https://gohugo.io/content-management/comments/#configure-disqus
89+
# # Can be overwritten by same param in page frontmatter
90+
# BookComments = true
91+
92+
# # /!\ This is an experimental feature, might be removed or changed at any time
93+
# # (Optional, experimental, default false) Enables portable links and link checks in markdown pages.
94+
# # Portable links meant to work with text editors and let you write markdown without {{< relref >}} shortcode
95+
# # Theme will print warning if page referenced in markdown does not exists.
96+
# BookPortableLinks = true
97+
98+
# # /!\ This is an experimental feature, might be removed or changed at any time
99+
# # (Optional, experimental, default false) Enables service worker that caches visited pages and resources for offline use.
100+
# BookServiceWorker = true
101+
102+
# # /!\ This is an experimental feature, might be removed or changed at any time
103+
# # (Optional, experimental, default false) Enables a drop-down menu for translations only if a translation is present.
104+
# BookTranslatedOnly = false

content/_index.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: Introduction
3+
---
4+
5+
# Learn GitHub Actions By Deploying This Workshop
6+
7+
{{< slide first="true" >}}
8+
9+
{{< columns-image ratio="1:3" >}}
10+
11+
{{< figure
12+
src="/art/gray-dog-icons/forward.png"
13+
link="/credits"
14+
width="75%"
15+
>}}
16+
17+
<--->
18+
19+
20+
Do you want a guided but self-service way to learn how to use GitHub Actions? Then this workshop is for you!
21+
This site is designed to help you learn how to use GitHub actions by... deploying this workshop!
22+
23+
{{< hint >}}
24+
All of the artwork in this workshop is human generated. For more information on the artist you can click any of the images or see the [art credits]({{< relref path="/credits#artist" >}})
25+
{{< /hint >}}
26+
27+
{{</ columns-image >}}
28+
29+
## Share this workshop
30+
31+
The workshop is designed to be self-replicating. Encourage others to replicate it by sharing one of the urls below.
32+
33+
```bash
34+
{{% ref "/" %}}
35+
```
36+
```bash
37+
https://tinyurl.com/actions-workshop
38+
```
39+
40+
{{< /slide >}}
41+
42+
## Get Started
43+
{{< slide nextRef="workshop">}}
44+
45+
{{< hint warning icon>}}
46+
Look for the buttons!
47+
<br /><br />
48+
While browsable for later reference, this site and every page on the workshop is designed to be viewable as a linear experience.
49+
<br /><br />
50+
If you are ever not sure what to do next, just look for the blue buttons at the top of the page.
51+
{{< /hint >}}
52+
53+
54+
{{< /slide>}}

content/credits/_index.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
title: Credits
3+
bookCollapseSection: false
4+
---
5+
6+
# Credits
7+
8+
A big thank you to everyone who has contributed to the enhancement and proliferation of this workshop and the ecosystem
9+
that supports it.
10+
11+
If you liked this workshop style and want to learn more about `git` please check out the Guts of Git workshop at https://guts-of-git.carson-anderson.com/
12+
13+
## Artist
14+
15+
16+
{{% columns-image ratio="1:3" %}}
17+
18+
{{< figure
19+
src="/art/bluegreen-dog-icons/forward.png"
20+
link="/credits"
21+
width="75%"
22+
>}}
23+
24+
<--->
25+
26+
**Debbi Humrich**
27+
28+
{{%/ columns-image %}}
29+
30+
## Site Credits
31+
32+
{{% columns-image ratio="3:1" %}}
33+
34+
[GitHub Actions](https://docs.github.com/en/actions)
35+
36+
[Hugo](https://gohugo.io/)
37+
38+
[hugo-book theme](https://github.com/alex-shpak/hugo-book)
39+
40+
<--->
41+
{{< figure
42+
src="/art/gray-dog-icons/forward.png"
43+
link="/credits"
44+
width="75%"
45+
>}}
46+
47+
{{%/ columns-image %}}
48+
49+
50+
## Authors
51+
52+
{{% columns-image ratio="1:3" %}}
53+
54+
{{< figure
55+
src="/art/bluegreen-dog-icons/turning.png"
56+
link="/credits"
57+
width="75%"
58+
>}}
59+
60+
<--->
61+
62+
{{< authors >}}
63+
64+
{{%/ columns-image %}}
65+
66+

0 commit comments

Comments
 (0)