Skip to content

Commit

Permalink
ci: speed up nix actions
Browse files Browse the repository at this point in the history
  • Loading branch information
joscha committed Jun 5, 2024
1 parent 8a13671 commit 6c62cdc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: DeterminateSystems/nix-installer-action@v12
- uses: DeterminateSystems/magic-nix-cache-action@v7
- run: nix flake check
- name: Install direnv with Nix
uses: aldoborrero/direnv-nix-action@v2
Expand All @@ -37,9 +36,8 @@ jobs:
needs: build
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: DeterminateSystems/nix-installer-action@v12
- uses: DeterminateSystems/magic-nix-cache-action@v7
- name: Get tag version
if: startsWith(github.ref, 'refs/tags/')
id: get_tag_version
Expand All @@ -60,9 +58,8 @@ jobs:
needs: build
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: DeterminateSystems/nix-installer-action@v12
- uses: DeterminateSystems/magic-nix-cache-action@v7
- name: Install direnv with Nix
uses: aldoborrero/direnv-nix-action@v2
with:
Expand All @@ -74,13 +71,11 @@ jobs:
with:
name: docs
path: docs/
# https://github.com/actions/upload-pages-artifact
- uses: actions/upload-pages-artifact@v2
if: startsWith(github.ref, 'refs/tags/')
with:
path: ./docs
- name: Deploy to GitHub Pages
if: startsWith(github.ref, 'refs/tags/')
id: deployment
# https://github.com/actions/deploy-pages
uses: actions/deploy-pages@v2
5 changes: 2 additions & 3 deletions .github/workflows/update-flake-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: DeterminateSystems/nix-installer-action@v12
- uses: DeterminateSystems/magic-nix-cache-action@v7
- name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@main
with:
Expand Down

0 comments on commit 6c62cdc

Please sign in to comment.