-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: gstraccini[bot] <150967461+gstraccini[bot]@users.noreply.github.com>
- Loading branch information
1 parent
79009d8
commit 1244788
Showing
1 changed file
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Deploy via ftp | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
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: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build site | ||
run: npm run build | ||
|
||
- name: Upload site | ||
uses: sebastianpopp/ftp-action@releases/v2 | ||
with: | ||
host: ${{ secrets.FTP_SERVER }} | ||
user: ${{ secrets.FTP_USERNAME }} | ||
password: ${{ secrets.FTP_PASSWORD }} | ||
localDir: "build" | ||
remoteDir: "/" | ||
|
||
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: | ||
allowUpdates: false | ||
skipIfReleaseExists: true | ||
draft: false | ||
makeLatest: true | ||
tag: v${{ env.SEMVER }} | ||
name: Release v${{ env.SEMVER }} | ||
generateReleaseNotes: true | ||
body: Release ${{ env.SEMVER }} of ${{ github.event.repository.name }} |