Replace Travis CI with GitHub workflows

This commit is contained in:
Gabriel Arazas 2022-03-01 18:00:33 +08:00
parent b632df22be
commit 877746c416
2 changed files with 21 additions and 23 deletions

21
.github/workflows/gh-pages.yml vendored Normal file
View File

@ -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

View File

@ -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