I installed the GitHub Actions runner on a Debian 8 Server. I'm trying to build a .NET application and copy it to another directory. The building part works fine, but I'm unable to copy the files.
I'm trying to create the directory with "sudo mkdir -p ..." first and then try to copy the files with "sudo cp -r ... ...". Those steps don't fail, the show "shell: /usr/bin/bash -e {0}" in the log and do nothing. Neither can I create the directory, nor can I copy the files.
Does anybody know, what I'm overlooking? First I thought it's because of the "sudos" and the runner expects a passwort input, but I configured passwordless sudo and I can run other sudo commands aswell.
name: github-actions
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: "dotnet build"
run: dotnet build --configuration Release
- run: sudo mkdir -p "/opt/my_project/server"
- name: copy files
run: sudo cp -r "/home/runner/work/common/common/Server/bin/Release/net5.0" "/opt/my_project/server"
- run: sudo systemctl start my_project