Skip to content

Commit

Permalink
github-actions: update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Lehmanator committed Jun 17, 2024
1 parent c45bb5c commit 530391b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 20 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,19 @@ jobs:
needs: checks
runs-on: ubuntu-latest
steps:
- name: Build flake outputs
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
with:
diagnostic-endpoint: ""
- uses: DeterminateSystems/magix-nix-cache-action
diagnostic-endpoint: ""
upstream-cache: https://lehmanator.cachix.org
use-flakehub: false
use-gha-cache: true
- name: Build flake packages.default
run: nix build
- name: Build PDF
run: 'nix run .#pdf -- resume.pdf'
deploy:
needs: build
runs-on: ubuntu-latest
Expand All @@ -35,10 +46,14 @@ jobs:
steps:
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload resume artifacts
- name: Upload resume HTML artifact
uses: actions/upload-pages-artifact@v3
with:
path: "./result"
- name: Upload resume PDF artifact
uses: actions/upload-pages-artifact@v3
with:
path: "./resume.pdf"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
33 changes: 15 additions & 18 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Check flake outputs
on:
pull_request:
Expand All @@ -7,30 +8,26 @@ jobs:
checks:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
#- name: Install Nix
# uses: cachix/install-nix-action@v22
# with:
# nix_path: nixpkgs=channel:nixos-unstable
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
with:
# Disable telemetry
diagnostic-endpoint: ""
- name: Use binary cache
uses: DeterminateSystems/magic-nix-cache-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
with:
# Disable telemetry
diagnostic-endpoint: ""
# Use my binary cache (uses cache.nixos.org upstream)
upstream-cache: https://lehmanator.cachix.org
use-flakehub: false
use-gha-cache: true
- name: Check flake inputs
uses: DeterminateSystems/flake-checker-action@main
- uses: DeterminateSystems/flake-checker-action@main
with:
# Disable telemetry
send-statistics: false
#- name: Check flake
# run: nix flake check

# Check formatting
- name: Check nix file formatting
run: 'nix fmt . -- --check'
- name: Check yaml file formatting
run: 'nix run nixpkgs#yamllint -- --strict --format github .github/'
- name: Check deadnix file formatting
run: 'nix run nixpkgs#deadnix -- --fail .'
- name: Check flake
run: nix flake check

0 comments on commit 530391b

Please sign in to comment.