Skip to content

Commit

Permalink
deploy for organizers wiki (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kubik161 authored Jan 5, 2025
1 parent 5d27808 commit d7eb286
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/publish-organizers-wiki.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
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/organizers-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/organizers-wiki'

0 comments on commit d7eb286

Please sign in to comment.