Skip to content

Commit c6191f4

Browse files
committed
Publish manual and statistics using webdav
1 parent 2dc794b commit c6191f4

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

.github/workflows/stats.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ jobs:
99
name: Statistics
1010
uses: emacscollective/workflows/.github/workflows/stats.yml@main
1111
secrets:
12-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
13-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
12+
rclone_config: ${{ secrets.RCLONE_CONFIG }}

default.mk

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,12 @@ EMACS_Q_ARG ?= -Q
3434
EMACS_BATCH ?= $(EMACS) $(EMACS_Q_ARG) --batch $(EMACS_ARGS) $(LOAD_PATH)
3535
EMACS_INTR ?= $(EMACS) $(EMACS_Q_ARG) $(EMACS_ARGS) $(LOAD_PATH)
3636

37-
ifeq ($(CI), true)
38-
override GITSTATS = ../_gitstats/gitstats
39-
endif
4037
GITSTATS ?= gitstats
4138
GITSTATS_DIR ?= stats
4239
GITSTATS_ARGS ?= -c style=https://magit.vc/assets/stats.css -c max_authors=999
4340

44-
CFRONT_DIST ?= E2LUHBKU1FBV02
45-
S3_BUCKET ?= s3://$(DOMAIN)
41+
RCLONE ?= rclone
42+
RCLONE_ARGS ?= -v
4643

4744
ifdef NIX_PATH
4845
export SQLITE3_API_BUILD_COMMAND = nix-shell -p sqlite.dev --run "make all"

docs/Makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@ include ../default.mk
33

44
.PHONY: stats
55

6+
DOCS_DOMAIN = docs.$(DOMAIN)
7+
STAT_TARGET = $(subst .,_,$(STAT_DOMAIN)):$(PKG)/
8+
69
stats:
710
@printf "Generating statistics...\n"
811
@$(GITSTATS) $(GITSTATS_ARGS) $(TOP) $(GITSTATS_DIR)
912

1013
stats-upload:
1114
@printf "Uploading statistics...\n"
12-
@aws s3 sync $(GITSTATS_DIR) $(S3_BUCKET)/stats/$(PKG)
13-
@printf "Uploaded to $(S3_BUCKET)/stats/$(PKG)\n"
14-
@printf "Generating CDN invalidation\n"
15-
@aws cloudfront create-invalidation \
16-
--distribution-id $(CFRONT_DIST) --paths "/stats/*" > /dev/null
15+
@$(RCLONE) sync $(RCLONE_ARGS) stats $(STAT_TARGET)
1716

1817
CLEAN = stats
1918

0 commit comments

Comments
 (0)