move resume workflow entirely to nix
This commit is contained in:
6
.github/workflows/build-resume.yaml
vendored
6
.github/workflows/build-resume.yaml
vendored
@@ -22,19 +22,19 @@ jobs:
|
||||
uses: https://github.com/DeterminateSystems/nix-installer-action@main
|
||||
|
||||
- name: Build PDF
|
||||
run: nix develop --command latexmk -pdf main.tex && mv main.pdf Alice_Huston_Resume_Software_Engineer.pdf
|
||||
run: nix build .#default
|
||||
|
||||
- name: Upload PDF artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: resume-pdf
|
||||
path: Alice_Huston_Resume_Software_Engineer.pdf
|
||||
path: result/Alice_Huston_Resume_Software_Engineer.pdf
|
||||
|
||||
- name: Create Release
|
||||
if: success()
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: Alice_Huston_Resume_Software_Engineer.pdf
|
||||
files: result/Alice_Huston_Resume_Software_Engineer.pdf
|
||||
tag_name: resume-${{ github.run_number }}
|
||||
body: "Resume PDF built from commit ${{ github.sha }}"
|
||||
env:
|
||||
|
||||
26
flake.nix
26
flake.nix
@@ -31,8 +31,34 @@
|
||||
);
|
||||
|
||||
preCommitTool = if pkgs ? prek then pkgs.prek else pkgs.pre-commit;
|
||||
resume_final_pdf = "Alice_Huston_Resume_Software_Engineer.pdf";
|
||||
in
|
||||
{
|
||||
packages.default = pkgs.stdenvNoCC.mkDerivation {
|
||||
pname = "resume-pdf";
|
||||
version = "0.1.0";
|
||||
|
||||
src = pkgs.lib.cleanSource ./.;
|
||||
|
||||
nativeBuildInputs = [
|
||||
tex
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
latexmk -pdf -interaction=nonstopmode -halt-on-error main.tex
|
||||
mv main.pdf ${resume_final_pdf}
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p "$out"
|
||||
install -m 0644 ${resume_final_pdf} "$out/${resume_final_pdf}"
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = [
|
||||
tex
|
||||
|
||||
Reference in New Issue
Block a user