update #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: NodeJS with Gulp | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
schedule: | |
- cron: "0 1 * * 1" | |
workflow_dispatch: | |
inputs: | |
Name: | |
description: Main Deploy to Hosting | |
required: true | |
default: 'Main Deploy to Hosting' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Build | |
run: | | |
npm run inst | |
npm run build | |
- name: Deploy to Hosting | |
uses: SamKirkland/FTP-Deploy-Action@v4.3.4 | |
with: | |
server: ${{ secrets.FTP_SERVER }} | |
username: ${{ secrets.FTP_USERNAME }} | |
password: ${{ secrets.FTP_PASSWORD }} | |
server-dir: ${{ secrets.DIRECTORY }} | |
local-dir: ./site/ | |
state-name: .status.json | |
- name: Remove Status | |
uses: StephanThierry/ftp-delete-action@v2.1 | |
with: | |
host: ${{ secrets.FTP_SERVER }} | |
user: ${{ secrets.FTP_USERNAME }} | |
password: ${{ secrets.FTP_PASSWORD }} | |
remoteFiles: ".status.json;assets/cache/docid_*.php" | |
workingDir: ${{ secrets.DIRECTORY }} | |
ignoreSSL: 1 |