chore: standardize naming to MokoCassiopeia and correct GPL warranty placement #72
13
.github/workflows/reusable-deploy.yml
vendored
13
.github/workflows/reusable-deploy.yml
vendored
@@ -76,7 +76,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
@@ -128,10 +128,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Download build artifacts
|
- name: Download build artifacts
|
||||||
uses: actions/download-artifact@v7
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: deployment-package-${{ needs.detect.outputs.project-type }}
|
name: deployment-package-${{ needs.detect.outputs.project-type }}
|
||||||
path: ./dist
|
path: ./dist
|
||||||
@@ -139,10 +139,17 @@ jobs:
|
|||||||
- name: Setup SSH key
|
- name: Setup SSH key
|
||||||
if: inputs.deployment-method == 'ssh' || inputs.deployment-method == 'rsync'
|
if: inputs.deployment-method == 'ssh' || inputs.deployment-method == 'rsync'
|
||||||
run: |
|
run: |
|
||||||
|
if [ -z "${{ secrets.DEPLOY_KEY }}" ]; then
|
||||||
|
echo "Error: DEPLOY_KEY secret is not set"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/deploy_key
|
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/deploy_key
|
||||||
chmod 600 ~/.ssh/deploy_key
|
chmod 600 ~/.ssh/deploy_key
|
||||||
ssh-keyscan -H "${{ secrets.DEPLOY_HOST }}" >> ~/.ssh/known_hosts
|
ssh-keyscan -H "${{ secrets.DEPLOY_HOST }}" >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
|
# Ensure cleanup happens even on failure
|
||||||
|
trap 'rm -f ~/.ssh/deploy_key' EXIT
|
||||||
|
|
||||||
- name: Deploy via rsync
|
- name: Deploy via rsync
|
||||||
if: inputs.deployment-method == 'rsync'
|
if: inputs.deployment-method == 'rsync'
|
||||||
|
|||||||
@@ -65,11 +65,11 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
if: endsWith(inputs.script_path, '.py')
|
if: endsWith(inputs.script_path, '.py')
|
||||||
uses: actions/setup-python@v6
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ inputs.python_version }}
|
python-version: ${{ inputs.python_version }}
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload script output
|
- name: Upload script output
|
||||||
if: always()
|
if: always()
|
||||||
uses: actions/upload-artifact@v6
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: script-output-${{ github.run_id }}
|
name: script-output-${{ github.run_id }}
|
||||||
path: |
|
path: |
|
||||||
|
|||||||
Reference in New Issue
Block a user