starting to migrate to coruscant as main dev box #399
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Latest Generation | |
on: | |
push: | |
branches: [master] | |
jobs: | |
switch_commit: | |
name: Switch Commit | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
host: | |
- morak.sumnerevans.com | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install SSH key | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.SSH_KEY }} | |
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }} | |
- name: Switch commit on ${{ matrix.host }} | |
run: | | |
ssh root@${{ matrix.host }} "cd /etc/nixos && git fetch && git reset --hard $(git rev-parse HEAD)" | |
remote_build: | |
name: Remote Build | |
runs-on: ubuntu-latest | |
needs: [ switch_commit ] | |
strategy: | |
fail-fast: false | |
matrix: | |
host: | |
- morak.sumnerevans.com | |
steps: | |
- name: Install SSH key | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.SSH_KEY }} | |
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }} | |
- name: Remote build on ${{ matrix.host }} | |
run: | | |
ssh root@${{ matrix.host }} "time nixos-rebuild build --show-trace" | |
switch_generation: | |
name: Switch Generation | |
runs-on: ubuntu-latest | |
needs: [ remote_build ] | |
strategy: | |
fail-fast: false | |
matrix: | |
host: | |
- morak.sumnerevans.com | |
steps: | |
- name: Install SSH key | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.SSH_KEY }} | |
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }} | |
- name: Switch generation on ${{ matrix.host }} | |
run: | | |
ssh root@${{ matrix.host }} "time nixos-rebuild switch --show-trace" |