public inbox for ~johnnyrichard/olang-devel@lists.sr.ht
 help / color / mirror / code / Atom feed
* [olang/patches/.build.yml] build cancelled
  2024-02-17 20:27 [PATCH olang] docs: build: deploy site on push event Johnny Richard
@ 2024-02-17 19:25 ` builds.sr.ht
  0 siblings, 0 replies; 2+ messages in thread
From: builds.sr.ht @ 2024-02-17 19:25 UTC (permalink / raw)
  To: Johnny Richard; +Cc: ~johnnyrichard/olang-devel

olang/patches/.build.yml: CANCELLED in 14s

[docs: build: deploy site on push event][0] from [Johnny Richard][1]

[0]: https://lists.sr.ht/~johnnyrichard/olang-devel/patches/49608
[1]: mailto:johnny@johnnyrichard.com

✗ #1152203 CANCELLED olang/patches/.build.yml https://builds.sr.ht/~johnnyrichard/job/1152203

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH olang] docs: build: deploy site on push event
@ 2024-02-17 20:27 Johnny Richard
  2024-02-17 19:25 ` [olang/patches/.build.yml] build cancelled builds.sr.ht
  0 siblings, 1 reply; 2+ messages in thread
From: Johnny Richard @ 2024-02-17 20:27 UTC (permalink / raw)
  To: ~johnnyrichard/olang-devel; +Cc: Johnny Richard

Signed-off-by: Johnny Richard <johnny@johnnyrichard.com>
---
This patch is already applied:

To git.sr.ht:~johnnyrichard/olang
  4c8374d...892b6b9 main -> main

 .build.yml    |  9 +++++++++
 .gitignore    |  1 +
 Makefile      |  8 ++++++++
 docs/Makefile | 10 +++++++++-
 4 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/.build.yml b/.build.yml
index b38efb3..42c5510 100644
--- a/.build.yml
+++ b/.build.yml
@@ -1,8 +1,13 @@
 image: archlinux
+oauth: pages.sr.ht/PAGES:RW
 packages:
   - gcc
   - make
+  - hut
   - clang
+  - pandoc-cli
+environment:
+  site: johnnyrichard.srht.site
 sources:
   - https://git.sr.ht/~johnnyrichard/olang
 tasks:
@@ -12,7 +17,11 @@ tasks:
   - build: |
       cd olang
       make
+      make docs-dist
   - check: |
       cd olang
       make check
+  - docs-publish: |
+      cd olang
+      [ -z "$BUILD_REASON" ] && hut pages publish -d $site docs/site.tar.gz
 
diff --git a/.gitignore b/.gitignore
index b140d08..fe64668 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 0c
 build
 *.o
+docs/site.tar.gz
diff --git a/Makefile b/Makefile
index b13b41b..bbc73dd 100644
--- a/Makefile
+++ b/Makefile
@@ -36,5 +36,13 @@ integration-test:
 check:
 	$(MAKE) integration-test
 
+.PHONY: docs
+docs:
+	$(MAKE) -C docs
+
+.PHONY: docs-dist
+docs-dist:
+	$(MAKE) -C docs dist
+
 $(BUILD_DIR)/%.o: $(SRC_DIR)/%.c
 	$(CC) $(CFLAGS) -c $< -o $@
diff --git a/docs/Makefile b/docs/Makefile
index e5b7154..ecb51a2 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -2,6 +2,7 @@ PANDOC     := pandoc
 INDEX      := index.md
 BUILD_DIR  := build
 TARGET     := $(BUILD_DIR)/index.html
+DIST_FILE  := site.tar.gz
 PAGES_DIR  := pages
 PAGES      := $(wildcard $(PAGES_DIR)/*.md)
 HTML_PAGES := $(patsubst $(PAGES_DIR)/%.md, $(BUILD_DIR)/$(PAGES_DIR)/%.html, $(PAGES))
@@ -11,7 +12,14 @@ all:  $(BUILD_DIR) $(TARGET) $(PAGES)
 
 .PHONY: clean
 clean:
-	rm -rf build/
+	rm -rf $(BUILD_DIR)
+	rm -f $(DIST_FILE)
+
+.PHONY: dist
+dist: $(DIST_FILE)
+
+$(DIST_FILE): all
+	tar -czf $(DIST_FILE) -C $(BUILD_DIR) .
 
 $(TARGET): $(HTML_PAGES)
 	$(PANDOC) -s --template template.html -f markdown -t html $(INDEX) > $(TARGET)
-- 
2.43.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-17 19:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-17 20:27 [PATCH olang] docs: build: deploy site on push event Johnny Richard
2024-02-17 19:25 ` [olang/patches/.build.yml] build cancelled builds.sr.ht

Code repositories for project(s) associated with this public inbox

	https://git.johnnyrichard.com/olang.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox