Skip to content

Commit

Permalink
upd workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
deemp committed Jul 24, 2023
1 parent 4f9b4e1 commit 3ee511c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 33 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ jobs:
run: |
git config --global user.name github-actions
git config --global user.email github-actions@github.com
- if: matrix.os == 'ubuntu-22.04'
name: Format Nix files
run: |-
nix profile install .#format
nix run .#format
- if: matrix.os == 'ubuntu-22.04'
name: Update flake locks
run: |-
nix profile install .#updateLocks
nix run .#updateLocks
- if: matrix.os == 'ubuntu-22.04'
name: Format Nix files
run: |-
nix profile install .#format
nix run .#format
- if: matrix.os == 'ubuntu-22.04'
name: Update docs
run: |-
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 21 additions & 25 deletions nix-files/workflow.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,27 @@ let
macosMaxStoreSize = 15000000000;
};
doCommit = false;
steps = _: stepsIf "${names.matrix.os} == '${os.ubuntu-22}'" [
(
let nameUpdateDocs = "Update docs"; in
[
{
name = nameUpdateDocs;
run = run.nixScript { name = scripts.genDocs.pname; };
}
(steps.commit { messages = [ (steps.updateLocks { }).name (steps.format { }).name nameUpdateDocs ]; })
]
)
{
name = "Copy docs";
run = "cp -r docs/book docs/dist";
}
{
name = "Publish docs to GitHub Pages";
uses = "peaceiris/actions-gh-pages@v3.9.3";
"with" = {
github_token = expr names.secrets.GITHUB_TOKEN;
publish_dir = "docs/dist";
force_orphan = true;
};
}
];
steps = { stepsAttrs, ... }:
stepsIf "${names.matrix.os} == '${os.ubuntu-22}'" [
{
name = "Update docs";
run = run.nixScript { name = scripts.genDocs.pname; };
}
(steps.commit { messages = [ (steps.updateLocks { }).name (steps.format { }).name stepsAttrs."Update docs".name ]; })
{
name = "Copy docs";
run = "cp -r docs/book docs/dist";
}
{
name = "Publish docs to GitHub Pages";
uses = "peaceiris/actions-gh-pages@v3.9.3";
"with" = {
github_token = expr names.secrets.GITHUB_TOKEN;
publish_dir = "docs/dist";
force_orphan = true;
};
}
];
};
};
in
Expand Down

0 comments on commit 3ee511c

Please sign in to comment.