diff --git a/.github/workflows/assets.yml b/.github/workflows/assets.yml index af375b50bb..d131b1bead 100644 --- a/.github/workflows/assets.yml +++ b/.github/workflows/assets.yml @@ -40,7 +40,8 @@ jobs: - run: yarn global add gulp-cli - run: ./ui/build prod - run: mkdir assets && mv public assets/ && cp LICENSE COPYING.md README.md assets/ && git log -n 1 --pretty=oneline > assets/commit.txt + - run: cd assets && tar -cvpJf ../assets.tar.xz . && cd - - uses: actions/upload-artifact@v1 with: name: lila-assets - path: assets + path: assets.tar.xz diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml index 875cde634b..d0e07fe7cd 100644 --- a/.github/workflows/server.yml +++ b/.github/workflows/server.yml @@ -46,7 +46,8 @@ jobs: - run: TZ=UTC git log -1 --date=iso-strict-local --pretty='format:app.version = """%h / %ad / %s"""%n' | tee conf/version.conf - run: ./lila -Depoll=true "test;dist" - run: unzip target/universal/lila-3.0.zip && cp LICENSE COPYING.md README.md lila-3.0 && git log -n 1 --pretty=oneline > lila-3.0/commit.txt + - run: cd lila-3.0 && tar -cvpJf ../lila-3.0.tar.xz . && cd - - uses: actions/upload-artifact@v1 with: name: lila-server - path: lila-3.0 + path: lila-3.0.tar.xz diff --git a/bin/ci-deploy.py b/bin/ci-deploy.py index df9bef2a79..c441846a7c 100755 --- a/bin/ci-deploy.py +++ b/bin/ci-deploy.py @@ -217,15 +217,18 @@ def deploy(profile, session, repo, runs): print(f"Deploying {url} to {profile['ssh']}...") header = f"Authorization: {session.headers['Authorization']}" artifact_target = f"{profile['artifact_dir']}/{profile['artifact_name']}-{run['id']:d}.zip" + artifact_unzipped = f"{profile['artifact_dir']}/{profile['artifact_name']}-{run['id']:d}" command = ";".join([ f"mkdir -p {profile['artifact_dir']}", f"mkdir -p {profile['deploy_dir']}/application.home_IS_UNDEFINED/logs", f"wget --header={shlex.quote(header)} -O {shlex.quote(artifact_target)} --no-clobber {shlex.quote(url)}", - f"unzip -q -o {shlex.quote(artifact_target)} -d {profile['artifact_dir']}/{profile['artifact_name']}-{run['id']:d}", - f"cat {profile['artifact_dir']}/{profile['artifact_name']}-{run['id']:d}/commit.txt", + f"unzip -q -o {shlex.quote(artifact_target)} -d {artifact_unzipped}", + f"mkdir -p {artifact_unzipped}/d", + f"tar -xf {artifact_unzipped}/*.tar.xz -C {artifact_unzipped}/d", + f"cat {artifact_unzipped}/d/commit.txt", f"chown -R lichess:lichess {profile['artifact_dir']}" ] + [ - f"ln -f --no-target-directory -s {profile['artifact_dir']}/{profile['artifact_name']}-{run['id']:d}/{symlink} {profile['deploy_dir']}/{symlink}" + f"ln -f --no-target-directory -s {artifact_unzipped}/d/{symlink} {profile['deploy_dir']}/{symlink}" for symlink in profile["symlinks"] ] + [ f"chown -R lichess:lichess {profile['deploy_dir']}",