Update .github/workflows/WebCI.yml
IMAGESTOR CI / IMAGESTOR_CI (push) Failing after 2s
Details
IMAGESTOR CI / IMAGESTOR_CI (push) Failing after 2s
Details
This commit is contained in:
parent
37a8dba958
commit
a7c371abc8
|
|
@ -1,4 +1,5 @@
|
|||
name: IMAGESTOR CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
|
|
@ -8,31 +9,41 @@ jobs:
|
|||
IMAGESTOR_CI:
|
||||
runs-on: [linux]
|
||||
steps:
|
||||
# --- STARTUP DISCORD NOTIFICATION ---
|
||||
- name: Send Startup Notification to Discord
|
||||
uses: sarisia/actions-status-discord@v1.16.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
|
||||
run: |
|
||||
curl -H "Content-Type: application/json" \
|
||||
-d "{
|
||||
\"username\": \"Fred The Builder\",
|
||||
\"avatar_url\": \"https://i.imgur.com/tgpIa7T.png\",
|
||||
\"embeds\": [
|
||||
{
|
||||
\"title\": \"Beginning IMAGESTOR WEB CI\",
|
||||
\"description\": \"Workflow triggered by commit: https://github.com/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA}\",
|
||||
\"color\": 16217354
|
||||
}
|
||||
]
|
||||
}" \
|
||||
"${{ secrets.DISCORD_WEBHOOK }}"
|
||||
|
||||
# --- CHECKOUT REPO ---
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3.5.3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# --- RESTORE LAST MODIFICATION TIMESTAMPS ---
|
||||
- name: Restore Last Modificaiton Timestamps
|
||||
uses: chetan/git-restore-mtime-action@v2
|
||||
|
||||
# --- MOVE CODE TO WORKING DIRECTORY ---
|
||||
- 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 'workingdir2' ! -name '.vscode' -exec mv -t workingdir2/ {} +
|
||||
|
||||
# --- SFTP UPLOAD WEB ---
|
||||
- name: SFTP Upload - Web
|
||||
uses: wangyucode/sftp-upload-action@v2.0.2
|
||||
with:
|
||||
|
|
@ -45,6 +56,7 @@ jobs:
|
|||
exclude: '*.git/*,*.git/,*.github/*,*.github/,README.md,.gitignore'
|
||||
removeExtraFilesOnServer: true
|
||||
|
||||
# --- SFTP UPLOAD FIVEM ---
|
||||
- name: SFTP Upload - Fivem
|
||||
uses: wangyucode/sftp-upload-action@v2.0.2
|
||||
with:
|
||||
|
|
@ -57,17 +69,25 @@ jobs:
|
|||
exclude: '*.git/*,*.git/,*.github/*,*.github/,README.md,.gitignore'
|
||||
removeExtraFilesOnServer: true
|
||||
|
||||
# --- MOVE CODE BACK ---
|
||||
- name: Put It All Back
|
||||
run: |
|
||||
mv ./workingdir2/* ./
|
||||
- name: Send Ending Notification to Discord
|
||||
uses: sarisia/actions-status-discord@v1.16.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
|
||||
|
||||
# --- ENDING DISCORD NOTIFICATION ---
|
||||
- name: Send Ending Notification to Discord
|
||||
if: always()
|
||||
run: |
|
||||
curl -H "Content-Type: application/json" \
|
||||
-d "{
|
||||
\"username\": \"Fred The Builder\",
|
||||
\"avatar_url\": \"https://i.imgur.com/tgpIa7T.png\",
|
||||
\"embeds\": [
|
||||
{
|
||||
\"title\": \"Completed IMAGESTOR WEB CI\",
|
||||
\"description\": \"Commit: https://github.com/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA} is now live on the Dev server.\",
|
||||
\"color\": 2852499
|
||||
}
|
||||
]
|
||||
}" \
|
||||
"${{ secrets.DISCORD_WEBHOOK }}"
|
||||
Loading…
Reference in New Issue