Skip to content

Commit

Permalink
fix: Update build.yml
Browse files Browse the repository at this point in the history
- Dep: checks
- Remove checking steps from build
- Deployment in separate job
- Single artifact upload step
- Add GitHub Pages deploy permissions
Lehmanator authored Apr 27, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent 0729c21 commit 778b2b1
Showing 1 changed file with 10 additions and 35 deletions.
45 changes: 10 additions & 35 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -5,49 +5,24 @@ on:
branches: ["main"]
jobs:
build:
needs: checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
with:
# Disable telemetry
diagnostic-endpoint: ""
#nix_path: nixpkgs=channel:nixos-unstable
- name: Use binary cache
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
#flakehub-api-server: https://api.flakehub.com
#flakehub-cache-server: https://cache.flakehub.com
#flakehub-flake-name: jsonresume-nix
#listen: "127.0.0.1:37515"
use-flakehub: false
use-gha-cache: true
- name: Check Nix flake inputs
uses: DeterminateSystems/flake-checker-action@main
with:
# Disable telemetry
send-statistics: false
- name: Build flake outputs
run: nix build
deploy:
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload resume HTML artifact
uses: actions/upload-pages-artifact@v3
with:
path: "./result/index.html"
- name: Upload resume assets artifacts
uses: actions/upload-pages-artifact@v3
with:
path: "./result/photo.png"
- name: Upload resume PDF artifacts
- name: Upload resume artifacts
uses: actions/upload-pages-artifact@v3
with:
path: "./result/resume.pdf"
path: "./result"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 778b2b1

Please sign in to comment.