fix(ci): remove GitHub-specific marketplace actions incompatible with Gitea act runner
- Remove actions/cache@v4 (uses GitHub's artifact API not available in Gitea) - Remove actions/upload-artifact@v4 (same reason) - Remove actions/download-artifact@v4 (same reason) - Deploy job now builds from source instead of downloading artifacts - Deploy container changed from alpine:3.20 to node:22-alpine for npm build
This commit is contained in:
@@ -44,14 +44,6 @@ jobs:
|
|||||||
git checkout "${{ github.sha }}"
|
git checkout "${{ github.sha }}"
|
||||||
shell: sh
|
shell: sh
|
||||||
|
|
||||||
- name: Cache npm dependencies
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: node_modules/
|
|
||||||
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-npm-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci --no-audit --no-fund
|
run: npm ci --no-audit --no-fund
|
||||||
|
|
||||||
@@ -82,14 +74,6 @@ jobs:
|
|||||||
git checkout "${{ github.sha }}"
|
git checkout "${{ github.sha }}"
|
||||||
shell: sh
|
shell: sh
|
||||||
|
|
||||||
- name: Cache npm dependencies
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: node_modules/
|
|
||||||
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-npm-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci --no-audit --no-fund
|
run: npm ci --no-audit --no-fund
|
||||||
|
|
||||||
@@ -98,13 +82,6 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
VITE_API_ORIGIN: ${{ vars.VITE_API_ORIGIN || '' }}
|
VITE_API_ORIGIN: ${{ vars.VITE_API_ORIGIN || '' }}
|
||||||
|
|
||||||
- name: Upload build artifacts
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: dist
|
|
||||||
path: dist/
|
|
||||||
retention-days: 7
|
|
||||||
|
|
||||||
# ──────────────────────────────────────────────
|
# ──────────────────────────────────────────────
|
||||||
# DEPLOY (manual): to shared hosting via SSH
|
# DEPLOY (manual): to shared hosting via SSH
|
||||||
# ──────────────────────────────────────────────
|
# ──────────────────────────────────────────────
|
||||||
@@ -112,7 +89,7 @@ jobs:
|
|||||||
name: Deploy to shared hosting
|
name: Deploy to shared hosting
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: alpine:3.20
|
image: node:22-alpine
|
||||||
if: github.ref == 'refs/heads/develop'
|
if: github.ref == 'refs/heads/develop'
|
||||||
needs: [lint, build]
|
needs: [lint, build]
|
||||||
environment:
|
environment:
|
||||||
@@ -134,16 +111,18 @@ jobs:
|
|||||||
git checkout "${{ github.sha }}"
|
git checkout "${{ github.sha }}"
|
||||||
shell: sh
|
shell: sh
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci --no-audit --no-fund
|
||||||
|
|
||||||
|
- name: Build project
|
||||||
|
run: npm run build
|
||||||
|
env:
|
||||||
|
VITE_API_ORIGIN: ${{ vars.VITE_API_ORIGIN || '' }}
|
||||||
|
|
||||||
- name: Install SSH and rsync
|
- name: Install SSH and rsync
|
||||||
run: |
|
run: |
|
||||||
apk add --no-cache openssh-client sshpass rsync
|
apk add --no-cache openssh-client sshpass rsync
|
||||||
|
|
||||||
- name: Download built artifacts
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: dist
|
|
||||||
path: dist/
|
|
||||||
|
|
||||||
- name: Deploy built files to shared hosting
|
- name: Deploy built files to shared hosting
|
||||||
run: |
|
run: |
|
||||||
sshpass -p "${{ secrets.SSH_PASSWORD }}" rsync -avz --delete \
|
sshpass -p "${{ secrets.SSH_PASSWORD }}" rsync -avz --delete \
|
||||||
|
|||||||
Reference in New Issue
Block a user