Skip to content

Use custom SSH port for Github Actions #36

Use custom SSH port for Github Actions

Use custom SSH port for Github Actions #36

Workflow file for this run

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 }}
SSH_PORT: ${{ secrets.SSH_PORT }}
run: .github/scripts/deploy.sh