-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 64e565e
Showing
18 changed files
with
1,965 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: CI/CD Pipeline | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v4 | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
php-version: "8.2" | ||
|
||
- name: "Validate Composer" | ||
run: "composer validate" | ||
|
||
- name: "Install dependencies" | ||
run: "composer install --no-interaction --no-progress" | ||
|
||
- name: "Test" | ||
run: "composer test" | ||
|
||
- name: "Build" | ||
run: "make" | ||
|
||
- name: Upload Pages Artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: "build" | ||
|
||
deploy: | ||
needs: build | ||
|
||
permissions: | ||
pages: write | ||
id-token: write | ||
|
||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/vendor/ | ||
/.idea/ | ||
/build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
build-page: | ||
$(MAKE) clean | ||
mkdir build | ||
php generate-html.php > build/index.html | ||
cp -r assets/* build/ | ||
clean: | ||
rm -rf build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Jan's Boardgames 🎲 | ||
|
||
This is a static site generator for my boardgames hobby. | ||
|
||
The `generate-html.php` script reads the [Board Game Geek XML API](https://boardgamegeek.com/wiki/page/BGG_XML_API2) to retrieve my profile data and generates an HTML file. | ||
|
||
GitHub Actions are used to deploy the static site. | ||
|
||
## Usage | ||
|
||
1. Run `composer install` | ||
2. Run `make` | ||
3. Open `build/index.html` in your browser | ||
|
||
(The deployment to GitHub pages is handled by the GitHub action in `.github/workflows/pages.yml`) |
Binary file not shown.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
:root { | ||
--font-size: 16px; | ||
--color-background: #242629; | ||
--color-background-darkened: #16161a; | ||
--color-headline: #fffffe; | ||
--color-paragraph: #94a1b2; | ||
--color-button: #7f5af0; | ||
--color-button-text: #fffffe; | ||
--color-highlight: #7f5af0; | ||
--color-secondary: #72757e; | ||
--color-tertiary: #2cb67d; | ||
} | ||
|
||
@font-face { | ||
font-family: Oswald; | ||
src: url('fonts/Oswald-VariableFont_wght.ttf'); | ||
} | ||
|
||
body { | ||
background-color: var(--color-background); | ||
color: var(--color-paragraph); | ||
font-family: "Oswald", sans-serif; | ||
font-size: var(--font-size); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"pre-commit": { | ||
"enabled": true, | ||
"actions": [ | ||
{ | ||
"action": "\\CaptainHook\\App\\Hook\\PHP\\Action\\Linting" | ||
}, | ||
{ | ||
"action": "composer test" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"name": "janwennrich/boardgames", | ||
"description": "Static site generator for my boardgames hobby", | ||
"type": "project", | ||
"require": { | ||
"php": "^8.2", | ||
"php-di/php-di": "^7.0.7", | ||
"twig/twig": "^3.14.0", | ||
"nataniel/bggxmlapi2": "^1.1.5" | ||
}, | ||
"require-dev": { | ||
"captainhook/captainhook": "^5.23.5", | ||
"phpstan/phpstan": "^1.12.3", | ||
"squizlabs/php_codesniffer": "^3.10.2" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"JanWennrich\\BoardGames\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"JanWennrich\\BoardGames\\": "tests/" | ||
} | ||
}, | ||
"minimum-stability": "stable", | ||
"config": { | ||
"sort-packages": true | ||
}, | ||
"scripts": { | ||
"test": [ | ||
"vendor/bin/phpstan", | ||
"vendor/bin/phpcs" | ||
] | ||
} | ||
} |
Oops, something went wrong.