forked from UEK-i-team/team-homepage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change of github action to support sftp
- Loading branch information
Showing
2 changed files
with
48 additions
and
13 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
name: Build site | ||
name: Build and Deploy Site | ||
|
||
on: | ||
push: | ||
# branches: | ||
# - develop | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-and-deploy: | ||
|
@@ -16,21 +16,20 @@ jobs: | |
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 21 | ||
node-version: 14 | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Deploy to FTPS | ||
uses: SamKirkland/[email protected] | ||
- name: Deploy to SFTP | ||
uses: appleboy/sftp-action@master | ||
with: | ||
server: ${{ secrets.FTPS_SERVER }} | ||
username: ${{ secrets.FTPS_USERNAME }} | ||
password: ${{ secrets.FTPS_PASSWORD }} | ||
server-dir: /srv/dev-disk-by-uuid-f4fc2a45-bf9e-4201-8897-946abbcea427/Users/iteam/site_files/ | ||
protocol: ftps | ||
port: 21 | ||
|
||
host: ${{ secrets.SFTP_HOST }} | ||
username: ${{ secrets.SFTP_USERNAME }} | ||
password: ${{ secrets.SFTP_PASSWORD }} | ||
port: ${{ secrets.SFTP_PORT }} | ||
local: "dist" | ||
remote: "/home/demoman/github-actions/" # Path on the SFTP server where files will be uploaded |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Build site | ||
|
||
on: | ||
push: | ||
# branches: | ||
# - develop | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 21 | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Deploy to FTPS | ||
uses: SamKirkland/[email protected] | ||
with: | ||
server: ${{ secrets.FTPS_SERVER }} | ||
username: ${{ secrets.FTPS_USERNAME }} | ||
password: ${{ secrets.FTPS_PASSWORD }} | ||
server-dir: /srv/dev-disk-by-uuid-f4fc2a45-bf9e-4201-8897-946abbcea427/Users/iteam/site_files/ | ||
protocol: ftps | ||
port: 21 | ||
|