Content update WS23 #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI/CD | |
on: [push, pull_request] | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the source-code | |
uses: actions/checkout@v2 | |
- name: Setup (Nixpkgs config and NIXPKGS_COMMIT) | |
run: echo "NIXPKGS_COMMIT=$(curl -L 'https://channels.nixos.org/nixos-unstable/git-revision')" >> $GITHUB_ENV | |
- name: Install Nix | |
uses: cachix/install-nix-action@v12 | |
with: | |
nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/${{ env.NIXPKGS_COMMIT }}.tar.gz | |
- name: Build the Anfipraesentationen | |
run: | | |
.github/scripts/gen-buildinfo.sh | |
nix-build --argstr date "$(date --date=@$(git log -1 --pretty=%ct) +%F)" --arg doCheck true | |
mkdir anfipraesentation && cp result/* .BUILDINFO anfipraesentation/ | |
- name: Upload the anfipraesentationen (GitHub artifacts) | |
uses: actions/upload-artifact@v2 | |
with: | |
name: anfipraesentation | |
path: anfipraesentation/ | |
- name: Deploy the anfipraesentationen | |
if: ${{ github.repository_owner == 'fsi-tue' && github.ref == 'refs/heads/master' }} | |
env: | |
SSH_KEY: ${{ secrets.SSH_KEY }} | |
run: .github/scripts/deploy.sh |