Skip to content

update_content

update_content #16

Workflow file for this run

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/