Demo code for a talk on GitHub Actions delivered at SeaGL 2020.
- Install ASP.NET Core Runtime 3.1 for Linux
- Install rsync: (
sudo yum install -y rsyncin CentOS8) - Configure firewall to allow access to 80/tcp (CentOS8 commands below)
sudo firewall-cmd --zone=public --add-port 80/tcp --permanentsudo firewall-cmd --reload
- Build and publish to the
published/directory:dotnet publish --configuration Release --runtime centos.8-x64 --no-self-contained -o published src/Hello/Hello.csproj - Export environment variables
DEPLOY_USERandDEPLOY_HOST(e.g.export DEPLOY_USER=rootandexport DEPLOY_HOST=<host IP address>) - Deploy from the
published/directory:deploy/deploy.sh published(assumes SSH keys are configured)