From aedcac2777c5ad739aa94a7365a6c28bfb98cbb5 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Mon, 27 Feb 2023 18:45:14 +0800 Subject: [PATCH] Separate updating webring and building site steps This enables updating post without interrupting the webring which is supposed to stay for a week. --- .github/workflows/build-webring.yml | 14 ++++++++++++++ .github/workflows/build.yml | 8 +++++--- Makefile | 2 +- 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/build-webring.yml diff --git a/.github/workflows/build-webring.yml b/.github/workflows/build-webring.yml new file mode 100644 index 0000000..92811d0 --- /dev/null +++ b/.github/workflows/build-webring.yml @@ -0,0 +1,14 @@ +name: "Update webring" +on: + schedule: + # Every Sunday. + - cron: '0 0 * * 0' +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: cachix/install-nix-action@v17 + with: + nix_path: nixpkgs=channel:nixpkgs-unstable + - run: nix develop -c make build-openring diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d29fd3e..eed4b7e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,9 +3,11 @@ on: push: branches: - master - schedule: - # Every Sunday. - - cron: '0 0 * * 0' + workflow_run: + workflows: + - "Update webring" + types: + - "completed" jobs: build: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index 6a88ea4..d1b5667 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .PHONY: build -build: build-openring +build: hugo --destination public .PHONY: build-openring