Skip to content

Commit

Permalink
Merge pull request #4 from ouassimBenMosbah/development
Browse files Browse the repository at this point in the history
build: automatically deploy code on tag push
  • Loading branch information
ouassimBenMosbah authored Oct 17, 2024
2 parents 29fb793 + fb61aa3 commit b901ba0
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on:
push:
tags:
- "v*" # Triggers when a version tag (eg: v1.0.0) is pushed.
name: 🚀 Deploy website on tag push to OVH FTP
jobs:
web-deploy:
name: 🎉 Deploy
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v4

- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: "18"

- name: Install Yarn
run: corepack enable && corepack prepare yarn@stable --activate

- name: 🔨 Build Project
run: |
yarn
yarn build --configuration production
- name: Deploy to FTP server
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
local-dir: dist/
server-dir: /www/

0 comments on commit b901ba0

Please sign in to comment.