Skip to content

Commit

Permalink
build: Use nix for pushing to RTD
Browse files Browse the repository at this point in the history
  • Loading branch information
bow committed Jul 22, 2024
1 parent 0724e60 commit c88d972
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,21 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Install Nix
uses: cachix/install-nix-action@v27
with:
# Ensure all git history is cloned, so we can infer the correct version in Docker.
fetch-depth: 0
nix_path: nixpkgs=flake:nixpkgs

- name: Trigger ReadTheDocs build
- name: Install Cachix
uses: cachix/cachix-action@v15
with:
name: bow
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Push to ReadTheDocs
env:
RTD_TOKEN: ${{ secrets.RTD_TOKEN }}
run: |
make docs-rtd
RTD_BUILD_API_URL: https://readthedocs.org/api/v3/projects/volt/versions/latest/builds/
run: >
nix develop .#ci --command
curl -X POST -H "Authorization: Token ${{ secrets.RTD_TOKEN }}" ${RTD_BUILD_API_URL}
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
};
shellPkgs = with pkgs; [
pythonEnv
curl
deadnix
nixfmt-rfc-style
pre-commit
Expand Down

0 comments on commit c88d972

Please sign in to comment.