Skip to content

Export paperless data daily #177

Export paperless data daily

Export paperless data daily #177

Workflow file for this run

name: deploy
on:
push:
branches:
- "main"
permissions: read-all
jobs:
Check:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup Nix
uses: DeterminateSystems/nix-installer-action@main
with:
diagnostic-endpoint: ""
- name: "Run flake checks"
run: nix flake check --all-systems
Lint:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup Nix
uses: DeterminateSystems/nix-installer-action@main
with:
diagnostic-endpoint: ""
- name: Check format
run: nix fmt -- --check .
- name: Lint using Statix
run: nix run nixpkgs#statix -- check .
Deploy:
needs: [Check, Lint]
runs-on: ubuntu-latest
steps:
- name: Tailscale
uses: tailscale/github-action@v2
with:
authkey: ${{ secrets.TAILSCALE_AUTH_KEY }}
statedir: /tmp/tailscale-state/
- name: Initialize SSH-Key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup Nix
uses: DeterminateSystems/nix-installer-action@main
with:
diagnostic-endpoint: ""
- name: Build config
run: nix develop --command bash -c 'colmena apply push'
- name: Build DNS config
run: nix build .#dns
- name: Deploy DNS config
run: nix develop --command bash -c 'octodns-sync --config-file result --doit'
env:
HETZNER_DNS_API: ${{ secrets.HETZNER_DNS_API }}
- name: Activate config
run: nix develop --command bash -c 'colmena apply'