Skip to content

Commit

Permalink
adjusting workflows 2 (#10)
Browse files Browse the repository at this point in the history
* adjusting build pipeline hugo

* adjusting hugo pipeline

* adjusting checkout version
  • Loading branch information
MatMol96 authored Jul 24, 2024
1 parent 7b9d5a8 commit a11b32b
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,32 @@ on:
branches:
- main

#permissions:
# contents: write
env:
PUBLISH_DIRECTORY: public

permissions:
contents: write

jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v25
- name: Checkout Production
if: github.ref_name == 'main'
uses: actions/checkout@v4
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix-build
- run: nix-shell --run "echo OK"
- run: nix-channel --add https://nixos.org/channels/nixos-23.11 nixpkgs
- run: nix-channel --update
ref: asf-site
path: ${{ env.PUBLISH_DIRECTORY }}
- name: Install Hugo
run: |
nix-env -iA nixpkgs.hugo
- name: Install Asciidoctor
sudo apt-get update
sudo apt-get install -y hugo asciidoctor
- name: Prepare
working-directory: ${{ env.PUBLISH_DIRECTORY }}
run: |
nix-env -iA nixpkgs.asciidoctor
rm -rf stylesheets
- name: Build Hugo site
run: |
hugo
Expand Down

0 comments on commit a11b32b

Please sign in to comment.