summaryrefslogtreecommitdiff
path: root/.github/workflows/deploy.yaml
blob: fc4b664195f31d07102ff709db9bbe644872f47d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: deploy systems

on:
  push:
    branches: [main]
  workflow_dispatch:

jobs:
  ci:
    uses: ./.github/workflows/ci.yaml
    secrets: inherit

  deploy:
    needs: ci
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: install nix
        uses: nixbuild/nix-quick-install-action@v26

      - name: setup cachix
        uses: cachix/cachix-action@v12
        with:
          name: getchoo
          authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}

      - name: connect to tailscale
        uses: tailscale/github-action@v2
        with:
            oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
            oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
            tags: tag:gha

      - name: enter dev shell
        run: nix develop

      - name: deploy all systems
        run: just da