Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
CAnorbo authored Nov 15, 2024
1 parent f8ab5df commit fbb29c8
Showing 1 changed file with 27 additions and 28 deletions.
55 changes: 27 additions & 28 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
on: push
name: πŸš€ Deploy to Production server
on:
push:
branches:
- master

name: πŸš€ Deploy to GitHub Pages

jobs:
web-deploy:
name: πŸŽ‰ Deploy
deploy:
name: πŸŽ‰ Deploy to GitHub Pages
runs-on: ubuntu-latest
timeout-minutes: 180
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: '20'
- name: πŸ”¨ Build Project
run: |
npm install
npm run build
- name: πŸ“‚ Sync files
uses: SamKirkland/FTP-Deploy-Action@4.3.2
with:
server: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
exclude: |
**/.git*
**/.git*/**
**/node_modules/**
**/.idea*
**/.idea*/**
timeout: 180000
- name: 🚚 Get latest code
uses: actions/checkout@v4

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: '20'

- name: πŸ”¨ Install dependencies and build project
run: |
npm install
npm run build
- name: πŸ“‚ Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build

0 comments on commit fbb29c8

Please sign in to comment.