Skip to content

Update test.php (#102) #86

Update test.php (#102)

Update test.php (#102) #86

Workflow file for this run

name: Deploy via ftp
on:
push:
branches: [ main ]
workflow_dispatch:
concurrency:
group: build-deploy
jobs:
deploy:
name: Deploy website to FTP
runs-on: ubuntu-latest
outputs:
semVer: ${{ steps.gitversion.outputs.semVer }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v2
with:
versionSpec: "5.x"
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v2
with:
useConfigFile: true
- name: Zip files
run: |
cd Src
zip -r deploy.zip . -x install.php
cd ..
mkdir Deploy
mv Src/deploy.zip Deploy
cp "Src/install.php" Deploy
- name: Upload service
uses: sebastianpopp/ftp-action@releases/v2
with:
host: ${{ secrets.FTP_SERVER }}
user: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
localDir: "Deploy/"
remoteDir: "/"
- name: Call install endpoint
run: |
curl "${{ secrets.INSTALLATION_ENDPOINT }}install.php"
create_release:
name: Create release
needs: deploy
env:
SEMVER: ${{ needs.deploy.outputs.semVer }}
runs-on: ubuntu-latest
steps:
- name: Create Release
uses: ncipollo/release-action@v1.14.0
with:
skipIfReleaseExists: true
allowUpdates: false
draft: false
makeLatest: true
tag: v${{ env.SEMVER }}
name: Release v${{ env.SEMVER }}
generateReleaseNotes: true
body: Release ${{ env.SEMVER }} of ${{ github.repository }}