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 "./bin/openring-create"
  - 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