Skip to content

Commit

Permalink
Create deploy.yml (#9)
Browse files Browse the repository at this point in the history
Co-authored-by: gstraccini[bot] <150967461+gstraccini[bot]@users.noreply.github.com>
  • Loading branch information
guibranco and gstraccini[bot] authored Oct 16, 2024
1 parent 79009d8 commit 1244788
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/deploy.yml
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 }}

0 comments on commit 1244788

Please sign in to comment.