Skip to content

Merge pull request #320 from GregFinzer/feature/VolunteerLocationParam #49

Merge pull request #320 from GregFinzer/feature/VolunteerLocationParam

Merge pull request #320 from GregFinzer/feature/VolunteerLocationParam #49

name: Build, Test, and Deploy to Develop
on:
push:
branches:
- develop # Adjust this to your branch name
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set environment variable from secret
run: echo "GOLD=${{ secrets.GOLD }}" >> $GITHUB_ENV
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x' # Adjust the version if needed
- name: Replace Connection String in appsettings.Development.json
run: |
sed -i 's#"DefaultConnection": ".*"#"DefaultConnection": "${{ secrets.DEV_CONNECTION_STRING }}"#' ./BedBrigade.Client/appsettings.Development.json
- name: Restore dependencies
run: dotnet restore
- name: Build project
run: dotnet build --configuration Release --no-restore
- name: Run tests
run: dotnet test
- name: Publish
run: dotnet publish --configuration Release --output ./publish
- name: FTP Deploy
uses: SamKirkland/FTP-Deploy-Action@v4.3.4
with:
server: ${{ secrets.FTP_DEV_HOST }} # FTP server is now a secret
username: ${{ secrets.FTP_DEV_USERNAME }} # Set up this secret in your GitHub repo settings
password: ${{ secrets.FTP_DEV_PASSWORD }} # Set up this secret in your GitHub repo settings
local-dir: ./publish/
server-dir: / # Replace with the target directory on your server
protocol: ftp # or ftp if you are not using a secure connection