File tree Expand file tree Collapse file tree 3 files changed +7
-12
lines changed
Expand file tree Collapse file tree 3 files changed +7
-12
lines changed Original file line number Diff line number Diff line change 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 }}
Original file line number Diff line number Diff line change @@ -34,15 +34,12 @@ EMACS_Q_ARG ?= -Q
3434EMACS_BATCH ?= $(EMACS ) $(EMACS_Q_ARG ) --batch $(EMACS_ARGS ) $(LOAD_PATH )
3535EMACS_INTR ?= $(EMACS ) $(EMACS_Q_ARG ) $(EMACS_ARGS ) $(LOAD_PATH )
3636
37- ifeq ($(CI ) , true)
38- override GITSTATS = ../_gitstats/gitstats
39- endif
4037GITSTATS ?= gitstats
4138GITSTATS_DIR ?= stats
4239GITSTATS_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
4744ifdef NIX_PATH
4845export SQLITE3_API_BUILD_COMMAND = nix-shell -p sqlite.dev --run "make all"
Original file line number Diff line number Diff 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+
69stats :
710 @printf " Generating statistics...\n"
811 @$(GITSTATS ) $(GITSTATS_ARGS ) $(TOP ) $(GITSTATS_DIR )
912
1013stats-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
1817CLEAN = stats
1918
You can’t perform that action at this time.
0 commit comments