website/.gitea/workflows/deploy.yaml

49 lines
1.0 KiB
YAML
Raw Normal View History

2024-07-14 15:35:46 -04:00
name: Deploy website
run-name: ${{ gitea.actor }} déploie 🚀
on: [push]
jobs:
build:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm install
2024-07-15 13:56:21 -04:00
- name: NPM build
2024-07-14 15:35:46 -04:00
run: npm run build
- name: Upload Artifacts
2024-07-15 13:36:30 -04:00
uses: actions/upload-artifact@v3
2024-07-14 15:35:46 -04:00
with:
name: build
path: 'build/'
overwrite: true
deploy:
needs: build
environment:
name: pls5618.com
url: https://pls5618.com
steps:
2024-07-15 13:56:21 -04:00
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: build
2024-07-15 13:58:50 -04:00
path: 'build/'
2024-07-15 13:56:21 -04:00
- name: FTP Deploy
2024-07-14 15:35:46 -04:00
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
with:
server: pls5618.com
username: ${{ secrets.ftp_user }}
password: ${{ secrets.ftp_password }}
2024-07-15 13:53:05 -04:00
local-dir: ./build/
2024-07-14 15:35:46 -04:00