-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.17 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: ftp upload
on:
push:
branches:
- main
workflow_dispatch:
repository_dispatch:
types: [update_content]
jobs:
build:
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, '[skip ci]') == false
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v3
- name: 📸 Calculate commit hash
id: sha
uses: pr-mpt/actions-commit-hash@v2
- name: 🔨 Prepare Node environment
uses: actions/setup-node@v4
with:
node-version: 20
- name: 🎉 Install project dependencies
run: npm install
- name: 🏗️ Build app
run: npm run build
env:
PUBLIC_MICROCMS_SERVICE_DOMAIN: ${{ secrets.PUBLIC_MICROCMS_SERVICE_DOMAIN }}
PUBLIC_MICROCMS_API_KEY: ${{ secrets.PUBLIC_MICROCMS_API_KEY }}
- name: 📂 Sync files
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWARD }}
local-dir: ./dist/
server-dir: /home/${{ secrets.FTP_USERNAME }}/www/misc-mdn/