trying to use upload-artifact action
CI / node-build (push) Successful in 2m23s
CI / docker-build (push) Successful in 1m0s
CI / deploy (push) Successful in 35s

This commit is contained in:
2026-06-25 01:33:33 +08:00
parent 051d6e6d23
commit 5d9747a65e
2 changed files with 33 additions and 13 deletions
+26 -11
View File
@@ -25,12 +25,18 @@ jobs:
working-directory: ./src
- name: Copy _headers file
run: cp docker-images/bee-dashboard/_headers src/build
- name: Compress static HTML assets
run: find src/build -name "*.html" -type f -exec gzip -k -9 {} \;
- name: Compress static JS assets
run: find src/build -name "*.js" -type f -exec gzip -k -9 {} \;
- name: Compress static CSS assets
run: find src/build -name "*.css" -type f -exec gzip -k -9 {} \;
- name: Create archive
run: tar -czf docker-images/bee-dashboard/bee-dashboard.tar -C src/build .
- name: Upload folder as artifact
uses: https://gitea.com/actions/gitea-upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: build-artifact
name: bee-dashboard.tar
path: docker-images/bee-dashboard/bee-dashboard.tar
# - name: Publish archive to gitea.woggioni.net
# run: curl --user woggioni:${{ secrets.PUBLISHER_TOKEN }} --upload-file docker-images/bee-dashboard/bee-dashboard.tar https://gitea.woggioni.net/api/packages/woggioni/generic/bee-dashboard/0.35.1/bee-dashboard.tar
@@ -38,17 +44,21 @@ jobs:
runs-on: hostinger
needs: node-build
steps:
- name: Checkout sources
uses: actions/checkout@v6
with:
path: docker-images
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: bee-dashboard.tar
path: docker-images/bee-dashboard
- name: Login to Gitea container registry
uses: docker/login-action@v3
with:
registry: gitea.woggioni.net
username: woggioni
password: ${{ secrets.PUBLISHER_TOKEN }}
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: build.artifact
path: docker-images/bee-dashboard/bee-dashboard.tar
- name: Build and push bee-dashboard images
uses: docker/build-push-action@v6
with:
@@ -65,14 +75,19 @@ jobs:
deploy:
runs-on: hostinger
needs: node-build
container:
image: node:26-alpine
steps:
- name: Download artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v3
with:
name: build.artifact
path: docker-images/bee-dashboard/bee-dashboard.tar
name: bee-dashboard.tar
path: .
- run: mkdir build
- name: Extract artifact
run: tar -C build -xf /workspace/woggioni/docker-images/bee-dashboard.tar
- name: Deploy to Cloudflare
run: npx wrangler pages deploy --project-name bee-dashboard --branch main src/build
run: npx wrangler pages deploy --project-name bee-dashboard --branch main build
env:
CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
+7 -2
View File
@@ -1,7 +1,12 @@
server {
listen 80 http2;
listen [::]:80 http2;
listen 80;
listen [::]:80;
http2 on;
root /srv/http;
gzip_static on;
gzip_vary on;
gzip off;
location / {
}
}