Inital commit of the full workflow for imgstor
This commit is contained in:
parent
2968f9f754
commit
1c2fd99a87
|
|
@ -1 +1,61 @@
|
|||
name: IMAGESTOR CI
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- Main
|
||||
|
||||
jobs:
|
||||
IMAGESTOR_CI:
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: Send Startup Notification to Discord
|
||||
uses: sarisia/actions-status-discord@v1.12.0
|
||||
if: always()
|
||||
with:
|
||||
webhook: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
nodetail: true
|
||||
title: "Beginning IMAGESTOR WEB CI"
|
||||
description: "Workflow triggered by commit: https://github.com/${{ github.repository }}/commit/${{ github.sha }}"
|
||||
username: "Fred The Builder"
|
||||
avatar_url: https://i.imgur.com/tgpIa7T.png
|
||||
color: 0xf7c12a #Yellow
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3.5.3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Restore Last Modificaiton Timestamps
|
||||
uses: chetan/git-restore-mtime-action@v2
|
||||
|
||||
- name: Move code to working directory so upload is easier
|
||||
run: |
|
||||
mkdir -p ./workingdir2
|
||||
find ./ -mindepth 1 -maxdepth 1 -type d ! -name '.git' ! -name '.github' ! -name 'workingdir' ! -name '.vscode' -exec mv -t workingdir2/ {} +
|
||||
|
||||
- name: SFTP Upload
|
||||
uses: wangyucode/sftp-upload-action@v2.0.2
|
||||
with:
|
||||
host: 127.0.0.1
|
||||
port: 22
|
||||
username: ${{ secrets.WEB_USER }}
|
||||
password: ${{ secrets.WEB_PASS }}
|
||||
localDir: './workingdir2'
|
||||
remoteDir: '/imgstor'
|
||||
exclude: '*.git/*,*.git/,*.github/*,*.github/,README.md,.gitignore'
|
||||
removeExtraFilesOnServer: true
|
||||
|
||||
- name: Put It All Back
|
||||
run: |
|
||||
mv ./workingdir2/* ./
|
||||
- name: Send Ending Notification to Discord
|
||||
uses: sarisia/actions-status-discord@v1.12.0
|
||||
if: always()
|
||||
with:
|
||||
webhook: ${{ secrets.DISCORD_WEBHOOK}}
|
||||
title: "Completed IMAGESTOR WEB CI"
|
||||
description: "Commit: https://github.com/${{ github.repository }}/commit/${{ github.sha }} is now live on the Dev server."
|
||||
username: "Fred The Builder"
|
||||
avatar_url: https://i.imgur.com/tgpIa7T.png
|
||||
color: 0x2af753 #Green
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue