fabianhauser.ch/.github/workflows/ci.yml
Fabian Hauser 34647405db
Some checks failed
CI / build (push) Failing after 30s
fixup! Update ci workflow to work with forgejo
2024-09-27 17:24:22 +03:00

54 lines
1.9 KiB
YAML

name: CI
on:
push:
pull_request:
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-22.04
container: nixpkgs/nix-flakes:nixos-24.05
steps:
- name: Setup NIX CI Environment
run: |
nix profile install nixpkgs#git-lfs nixpkgs#gnused
echo "substituters = https://nixpkgs-cache.qo.is?priority=39" >> /etc/nix/nix.conf
echo "trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" >> /etc/nix/nix.conf
mkdir -p ~/.config/nix && cp /etc/nix/nix.conf ~/.config/nix/
- name: Checkout Repository
shell: "nix shell nixpkgs#git-lfs nixpkgs#gnused --command {0}"
run: |
git config --global credential.helper store
export URL=`echo -n "$GITHUB_SERVER" | sed "s%https://%https://oauth2:$GITHUB_TOKEN@%"`
git lfs install
git clone --no-checkout $URL/$GITHUB_REPOSITORY .
git checkout --recurse-submodules $GITHUB_REF
git lfs pull
- name: Run Nix Build
shell: "nix shell nixpkgs#git-lfs --command {0}"
run: nix build .
# - uses: actions/upload-pages-artifact@v3
# with:
# path: result/
# deploy:
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
# runs-on: ubuntu-latest
# needs: build
# permissions:
# pages: write # to deploy to Pages
# id-token: write # to verify the deployment originates from an appropriate source
# steps:
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v4
# with:
# preview: true