Skip to content

Commit

Permalink
Update GitHub Actions config
Browse files Browse the repository at this point in the history
  • Loading branch information
yurrriq committed Aug 22, 2023
1 parent 4517b48 commit 77587df
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@ name: "Build site"
on:
push:
branches:
- master
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v8
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
with:
github_access_token: ${{ secretes.GITHUB_TOKEN }}
- name: Allow unfree
run: |
mkdir -p ~/.config/nixpkgs
echo '{ allowUnfree = true; }' >~/.config/nixpkgs/config.nix
- uses: cachix/cachix-action@v6
- uses: cachix/cachix-action@v12
with:
name: yurrriq
skipPush: true
Expand All @@ -22,11 +24,17 @@ jobs:
git -C docs config user.name github-actions
git -C docs config user.email github-actions@users.noreply.github.com
- name: Build
run: make
- name: GitHub Pages
run: |
git -C docs add --all .
git -C docs commit -m 'Deploy to GitHub Pages'
git -C docs push --quiet https://x-access-token:"$GITHUB_TOKEN"@github.com/"$GITHUB_REPOSITORY".git gh-pages
nix build
mkdir -p site
cp result/* site/
- name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v3
with:
build_dir: site
jekyll: false
keep_history: true
target_branch: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 77587df

Please sign in to comment.