5 Commits

Author SHA1 Message Date
zihluwang a4794e7273 Merge pull request 'ci: use scp/ssh instead of upload-artifact for Gitea Actions compatibility' (#6) from develop into main
Build and Deploy / Build release archive (release) Successful in 46s
Build and Deploy / Upload to Gitea Release (release) Failing after 5s
Build and Deploy / Deploy to onixbyte.cn (release) Failing after 10s
Reviewed-on: https://git.onixbyte.com/onixbyte/delta-force-guide-web/pulls/6
2026-06-16 01:36:07 +08:00
siujamo 04a282dd5e Merge pull request 'ci: use node 24 in build workflow' (#4) from develop into main
Build and Deploy / Build release archive (release) Failing after 35s
Build and Deploy / Upload to Gitea Release (release) Has been skipped
Build and Deploy / Deploy to onixbyte.cn (release) Has been skipped
Reviewed-on: https://git.onixbyte.com/onixbyte/delta-force-guide-web/pulls/4
2026-06-15 17:03:07 +08:00
siujamo 9145fabb2b Merge pull request 'v1.4.0' (#3) from develop into main
Build and Deploy / Build release archive (release) Failing after 16s
Build and Deploy / Upload to Gitea Release (release) Has been skipped
Build and Deploy / Deploy to onixbyte.cn (release) Has been skipped
Reviewed-on: https://git.onixbyte.com/onixbyte/delta-force-guide-web/pulls/3
2026-06-15 16:47:20 +08:00
siujamo f98737906f Merge pull request 'v1.4.0' (#2) from develop into main
Reviewed-on: https://git.onixbyte.com/onixbyte/delta-force-guide-web/pulls/2
2026-06-15 16:34:37 +08:00
siujamo 0f17374002 Merge pull request 'ci: migrate release workflow from GitHub Actions to Gitea Actions' (#1) from develop into main
Reviewed-on: https://git.onixbyte.com/onixbyte/delta-force-guide-web/pulls/1
2026-06-15 09:34:13 +08:00
+19 -41
View File
@@ -38,16 +38,7 @@ jobs:
port: ${{ vars.DEPLOY_PORT }}
key: ${{ secrets.DEPLOY_SSH_KEY }}
source: "dist.tar.gz"
target: "/tmp/build-artifact/"
- name: Move artifact to /tmp
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ vars.DEPLOY_HOST }}
username: ${{ vars.DEPLOY_USER }}
port: ${{ vars.DEPLOY_PORT }}
key: ${{ secrets.DEPLOY_SSH_KEY }}
command: mv /tmp/build-artifact/dist.tar.gz /tmp/dist.tar.gz && rm -rf /tmp/build-artifact
target: "/tmp/dist.tar.gz"
upload-release-asset:
name: Upload to Gitea Release
@@ -56,41 +47,28 @@ jobs:
steps:
- name: Download artifact from server
env:
DEPLOY_HOST: ${{ vars.DEPLOY_HOST }}
DEPLOY_USER: ${{ vars.DEPLOY_USER }}
DEPLOY_PORT: ${{ vars.DEPLOY_PORT }}
DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
run: |
set -e
SSH_DIR="${RUNNER_TEMP}/ssh"
mkdir -p "$SSH_DIR"
chmod 700 "$SSH_DIR"
printf '%s\n' "$DEPLOY_SSH_KEY" > "$SSH_DIR/key"
chmod 600 "$SSH_DIR/key"
scp -i "$SSH_DIR/key" \
-P "$DEPLOY_PORT" \
-o StrictHostKeyChecking=accept-new \
-o UserKnownHostsFile="$SSH_DIR/known_hosts" \
"${DEPLOY_USER}@${DEPLOY_HOST}:/tmp/dist.tar.gz" \
./dist.tar.gz
rm -rf "$SSH_DIR"
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ vars.DEPLOY_HOST }}
username: ${{ vars.DEPLOY_USER }}
port: ${{ vars.DEPLOY_PORT }}
key: ${{ secrets.DEPLOY_SSH_KEY }}
command: |
set -e
mkdir -p ~/.cache/gitea-artifacts
cp /tmp/dist.tar.gz ~/.cache/gitea-artifacts/
- name: Upload release asset via Gitea API
run: |
set -e
RELEASE_ID=$(jq -r '.release.id' "$GITEA_EVENT_PATH")
URL="${GITEA_SERVER_URL}/api/v1/repos/${GITEA_REPOSITORY}/releases/${RELEASE_ID}/assets?name=dist.tar.gz"
curl -fsSL \
-X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/gzip" \
--data-binary "@dist.tar.gz" \
"${URL}"
- name: Upload release asset
uses: https://gitea.com/actions/forgejo-release@v1
with:
direction: upload
files: ~/.cache/gitea-artifacts/dist.tar.gz
env:
FORGEJO_TOKEN: ${{ secrets.GITEA_TOKEN }}
deploy-to-server:
name: Deploy to onixbyte.cn
needs: [build, upload-release-asset]
needs: build
runs-on: ubuntu-latest
steps: