From 778b2b114370f3575da0544cf7ec0c54939005d6 Mon Sep 17 00:00:00 2001 From: Sam Lehman <134539022+Lehmanator@users.noreply.github.com> Date: Sat, 27 Apr 2024 16:10:52 -0400 Subject: [PATCH] fix: Update build.yml - Dep: checks - Remove checking steps from build - Deployment in separate job - Single artifact upload step - Add GitHub Pages deploy permissions --- .github/workflows/build.yml | 45 +++++++++---------------------------- 1 file changed, 10 insertions(+), 35 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee4604a..c80d8be 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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