ci: pack artifact.tar.xz.zip
parent
6a38e94dd9
commit
e8a4da1c98
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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']}",
|
||||
|
|
Loading…
Reference in New Issue