[FEATURE]: Adding Activities. #9
This file contains hidden or 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
| # This workflow build a .NET project according to the github official .NET action | |
| name: .NET | |
| on: | |
| push: | |
| branches: ["Workflow"] | |
| pull_request: | |
| branches: ["master"] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| MONGODB_PASSWORD: ${{ secrets.MONGODB_PASSWORD }} | |
| MONGODB_NAME: $MONGODB_NAME | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET 8.0 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --configuration Release --no-restore | |
| - name: Since is a web app, lets Pushish to get css & JS | |
| run: dotnet publish --configuration Release --no-build | |
| - name: Using artifacts | Upload build artifacts | |
| uses: actions/[email protected] | |
| with: | |
| name: dev.mssp | |
| path: bin/Release/net8.0/publish/ | |
| - name: Download artifact | |
| uses: actions/[email protected] | |
| with: | |
| name: dev.mssp | |
| path: publish | |
| - name: Copy artifact to the server | |
| uses: appleboy/scp-action@v1 | |
| with: | |
| host: ${{ secrets.FTP_SERVER }} | |
| username: ${{ secrets.FTP_USERNAME }} | |
| password: ${{ secrets.FTP_PASSWORD }} | |
| port: 22 | |
| # Strip components allow to copy only the content of the source folder according to the issue tab on github | |
| strip_components: 1 | |
| source: publish/* | |
| target: /var/www/mssp/ | |