Skip to content

Publish Wiki

Publish Wiki #494

Workflow file for this run

name: "Publish Wiki"
on:
schedule:
# Run every day at 01:30 UTC
- cron: '30 1 * * *'
workflow_dispatch:
jobs:
deploy-to-server:
runs-on: ubuntu-latest
steps:
# See documentation for the action
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.GIT_SSH_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}
if_key_exists: fail
- name: Clone repository
uses: actions/checkout@v3
with:
repository: ictunion/wiki
ref: main
ssh-key: ${{ secrets.GIT_SSH_KEY }}
ssh-known-hosts: ${{ secrets.KNOWN_HOSTS }}
- name: Install nix
uses: cachix/install-nix-action@v18
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Build wiki
run: nix build
- name: Deploy wiki
run: |
nix-shell -p rsync --run 'rsync -rt result/var [email protected]:/home/wiki'