Skip to content

Commit

Permalink
split deploy build jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
kayhhh committed Jun 12, 2024
1 parent 9f3659d commit ec20466
Showing 1 changed file with 49 additions and 8 deletions.
57 changes: 49 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,56 @@ concurrency:
cancel-in-progress: false

jobs:
build-server:
runs-on: ubuntu-latest
steps:
- uses: AdityaGarg8/remove-unwanted-software@v3
with:
remove-android: true
remove-codeql: true
remove-docker-images: true
remove-dotnet: true
remove-haskell: true

- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}
submodules: true

- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main

- name: Build server
if: inputs.disable-deploy != true
run: nix build -L .?submodules=1#unavi-server

build-web:
runs-on: ubuntu-latest
steps:
- uses: AdityaGarg8/remove-unwanted-software@v3
with:
remove-android: true
remove-codeql: true
remove-docker-images: true
remove-dotnet: true
remove-haskell: true

- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}
submodules: true

- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main

- name: Build web
if: inputs.disable-deploy != true
run: nix build -L .?submodules=1#unavi-web

deploy:
needs:
- build-server
- build-web
runs-on: ubuntu-latest
steps:
- uses: AdityaGarg8/remove-unwanted-software@v3
Expand Down Expand Up @@ -65,14 +114,6 @@ jobs:
message: "chore: update terraform output"
default_author: github_actions

- name: Build server
if: inputs.disable-deploy != true
run: nix build -L .?submodules=1#unavi-server

- name: Build web
if: inputs.disable-deploy != true
run: nix build -L .?submodules=1#unavi-web

- name: Deploy
if: inputs.disable-deploy != true
run: nix run .?submodules=1#deploy

0 comments on commit ec20466

Please sign in to comment.