From 877746c4168f6b94da437f74c86626bad6d8acdb Mon Sep 17 00:00:00 2001
From: Gabriel Arazas <foo.dogsquared@gmail.com>
Date: Tue, 1 Mar 2022 18:00:33 +0800
Subject: [PATCH] Replace Travis CI with GitHub workflows

---
 .github/workflows/gh-pages.yml | 21 +++++++++++++++++++++
 .travis.yml                    | 23 -----------------------
 2 files changed, 21 insertions(+), 23 deletions(-)
 create mode 100644 .github/workflows/gh-pages.yml
 delete mode 100644 .travis.yml

diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml
new file mode 100644
index 0000000..2e802eb
--- /dev/null
+++ b/.github/workflows/gh-pages.yml
@@ -0,0 +1,21 @@
+name: Build site
+
+on:
+  push:
+    branches:
+      - master
+
+jobs:
+  deploy:
+    runs-on: latest-ubuntu
+    steps:
+      - uses: actions/checkout@v2
+      - uses: cachix/install-nix-action@v16
+      - name: Build website
+        run: nix develop -c make build
+      - name: Deploy
+        uses: peaceiris/actions-gh-pages@v3
+        with:
+          github_token: ${{ secrets.GITHUB_TOKEN }}
+          publish_dir: ./public
+
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 4f19a55..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: nix
-
-before_script:
-  - sudo mkdir -p /etc/nix && echo 'sandbox = true' | sudo tee /etc/nix/nix.conf
-
-script:
-  - nix-shell --pure ./shell.nix --run "make build-openring"
-  - nix-env -i hugo go asciidoctor
-  - hugo
-
-env:
-  global:
-    - PRODUCTION=true
-
-deploy:
-  local_dir: "./public/"
-  provider: pages
-  skip_cleanup: true
-  github_token: $GITHUB_TOKEN  # Set in the settings page of your repository, as a secure variable
-  target_branch: gh-pages
-  on:
-    branch: master
-