Skip to content

Commit db60ffc

Browse files
author
Krispin Schulz
committed
add github actions to eleventy setup
1 parent 1b29355 commit db60ffc

25 files changed

Lines changed: 55 additions & 7116 deletions

File tree

.github/workflows/build.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build and Deploy Eleventy
2+
3+
on:
4+
push:
5+
branches: [ eleventy ]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Node
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 20
25+
26+
- name: Install dependencies
27+
run: npm install
28+
29+
- name: Build site
30+
run: npm run build
31+
32+
- name: Upload Pages artifact
33+
uses: actions/upload-pages-artifact@v3
34+
with:
35+
path: _site
36+
37+
# deploy:
38+
# needs: build
39+
# runs-on: ubuntu-latest
40+
41+
# environment:
42+
# name: github-pages
43+
# url: ${{ steps.deployment.outputs.page_url }}
44+
45+
# steps:
46+
# - name: Deploy to Pages
47+
# id: deployment
48+
# uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
22
.DS_Store
3+
_site

_data/message.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ export default async function() {
33
"https://community.fablab-cottbus.de/t/website-ankuendigung/778.json"
44
);
55
const data = await res.json();
6-
console.log(data)
76
return data
87
}

_includes/layouts/home.njk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ layout: layouts/base.njk
33
---
44
<!-- Delete this block, which will also remove the component CSS from the bundle -->
55
<style>{% include "css/message-box.css" %}</style>
6+
7+
{% if message.tags[0].name != "testschlagwort" %}
68
<div class="message-box">
79
<p>{{ message.post_stream.posts[0].cooked | safe }}</p>
810
</div>
11+
{% endif %}
12+
913
<!--
1014
<div class="message-box">
1115
<ol>

0 commit comments

Comments
 (0)