Skip to content

Commit 9dcd316

Browse files
authored
Merge pull request #2 from ProfessionalLinuxUsersGroup/add-github-action
feat: Add GH action workflow and unit index
2 parents e378f86 + bea77cf commit 9dcd316

File tree

2 files changed

+119
-0
lines changed

2 files changed

+119
-0
lines changed

.github/workflows/mdbook.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Sample workflow for building and deploying a mdBook site to GitHub Pages
2+
#
3+
# To get started with mdBook see: https://rust-lang.github.io/mdBook/index.html
4+
#
5+
name: Deploy mdBook site to Pages
6+
7+
on:
8+
# Runs on pushes targeting the default branch
9+
push:
10+
branches: ["main"]
11+
12+
# Allows you to run this workflow manually from the Actions tab
13+
workflow_dispatch:
14+
15+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
16+
permissions:
17+
contents: read
18+
pages: write
19+
id-token: write
20+
21+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
22+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
23+
concurrency:
24+
group: "pages"
25+
cancel-in-progress: false
26+
27+
jobs:
28+
# Build job
29+
build:
30+
runs-on: ubuntu-latest
31+
env:
32+
MDBOOK_VERSION: 0.4.45
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- name: Dynamically generate resources.md file
37+
run: ./scripts/generate_resources.sh
38+
39+
# Install rust with GitHub's 'setup-rs' action (most recent stable version)
40+
- name: Install Rust
41+
uses: actions-rs/toolchain@v1
42+
with:
43+
toolchain: stable # Or specify a version
44+
override: true # ensure this version is used globally in the workflow
45+
components: cargo
46+
47+
# Cache rust crates (mdbook dependencies) so reinstalls don't take long
48+
- name: Cache the cargo registry and build artifacts
49+
uses: actions/cache@v3
50+
with:
51+
path: |
52+
~/.cargo/registry
53+
~/.cargo/git
54+
target
55+
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
56+
restore-keys: cargo-${{ runner.os }}-
57+
58+
# Cache the mdbook binary so we don't need to install it every time
59+
- name: Cache mdbook binary
60+
id: cache-mdbook
61+
uses: actions/cache@v3
62+
with:
63+
path: ~/.cargo/bin/mdbook
64+
key: mdbook-${{ runner.os }}-${{ env.MDBOOK_VERSION }}
65+
restore-keys: mdbook-${{ runner.os }}-
66+
67+
# Install mdbook if it's not cached
68+
- name: Install mdBook
69+
if: steps.cache-mdbook.outputs.cache-hit != 'true'
70+
run: cargo install --version ${MDBOOK_VERSION} mdbook --force
71+
72+
- name: Setup Pages
73+
id: pages
74+
uses: actions/configure-pages@v5
75+
76+
- name: Build with mdBook
77+
run: mdbook build
78+
79+
- name: Upload artifact
80+
uses: actions/upload-pages-artifact@v3
81+
with:
82+
path: ./book
83+
84+
# Deployment job
85+
deploy:
86+
environment:
87+
name: github-pages
88+
url: ${{ steps.deployment.outputs.page_url }}
89+
runs-on: ubuntu-latest
90+
needs: build
91+
steps:
92+
- name: Deploy to GitHub Pages
93+
id: deployment
94+
uses: actions/deploy-pages@v4

src/unitindex.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<div class="flex-container" style="justify-content:center;">
2+
<img src="https://github.com/ProfessionalLinuxUsersGroup/img/blob/main/Assets/Logos/ProLUG_Round_Transparent_LOGO.png?raw=true" width="64" height="64"></img>
3+
<p>
4+
<h1>Table of Contents</h1>
5+
</p>
6+
</div>
7+
8+
| Unit | Topic |
9+
| :--: | :---------------------------------------------------------------------------------------------------: |
10+
| 1 | [Automation tools installation and execution]() |
11+
| 2 | [Interacting with the Operating system]() |
12+
| 3 | [Making and using inventories]() |
13+
| 4 | [Admin commands and one-offs]() |
14+
| 5 | [Environment and Local Variables in systems]() |
15+
| 6 | [Automating Docker Builds]() |
16+
| 7 | [Automating Docker environments]() |
17+
| 8 | [Automating K8s environments]() |
18+
| 9 | [Build and Deploy Linux systems]() |
19+
| 10 | [Harden Linux systems]() |
20+
| 11 | [Update and patch systems]() |
21+
| 12 | [Configure Network Devices]() |
22+
| 13 | [Remediating and Reporting on Drift]() |
23+
| 14 | [CI/CD Pipelines and Make v. Buy v. Adopt Decisions]() |
24+
| 15 | [Troubleshooting/Testing 1]() |
25+
| 16 | [Troubleshooting/Testing 2]() |

0 commit comments

Comments
 (0)