Files
ebook/.gitea/workflows/deploy.yml
levis 2909160b17
All checks were successful
Deploy Nuxt App / deploy (push) Successful in 1m47s
Обновить .gitea/workflows/deploy.yml
2025-06-19 18:08:01 +00:00

45 lines
1.2 KiB
YAML

name: Deploy Nuxt App
on: [push]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
token: ${{ secrets.TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '22'
- name: Install dependencies and build
run: |
npm install
npm run build
- name: Prepare deployment files
run: |
tar -czf deploy.tar.gz dist Dockerfile docker-compose.yml
- name: Upload files via Gitea API
env:
GITEA_API: "https://gitea.miduway.space/api/v1/repos/levis/ebook/raw/main"
GITEA_TOKEN: ${{ secrets.TOKEN }}
run: |
for file in Dockerfile docker-compose.yml; do
curl -X PUT \
-H "Authorization: token $TOKEN" \
-H "Content-Type: text/plain" \
-T "$file" \
"$GITEA_API/$file?branch=main"
done
curl -X PUT \
-H "Authorization: token $TOKEN" \
-H "Content-Type: application/gzip" \
-T "deploy.tar.gz" \
"$GITEA_API/deploy.tar.gz?branch=main"