Skip to content

feat: migrate to pnpm (#113) #108

feat: migrate to pnpm (#113)

feat: migrate to pnpm (#113) #108

name: Build and Deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
- name: Install dependencies
run: pnpm ci
- name: Set timezone
uses: szenius/[email protected]
with:
timezoneLinux: "Europe/Paris"
timezoneMacos: "Europe/Paris"
timezoneWindows: "Paris Standard Time"
- name: Set build date
run: echo 'BUILD_DATE="'$(date '+%Y-%m-%dT%H:%M:00')'"' > .env
- name: Build
run: pnpm run build
- name: copy file via ssh password
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSHKEY }}
port: ${{ secrets.PORT }}
source: ./dist/*
target: ${{ secrets.SERVER_FOLDER }}
strip_components: 1
rm: true