From 7971426e944c82fca849f10b789eb39b70aba1cc Mon Sep 17 00:00:00 2001 From: Administrator Date: Sat, 7 Oct 2023 14:00:03 +0000 Subject: [PATCH] update ci --- .gitlab-ci.yml | 6 ++++-- build.py | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3c51b8d..9852a2e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,10 +24,12 @@ build-job: # This job runs in the build stage, which runs first. stage: build script: - python build.py + artifacts: + paths: + - index.html deploy-job: # This job runs in the deploy stage. stage: deploy # It only runs when *both* jobs in the test stage complete successfully. environment: production script: - - echo "Deploying application..." - - echo "Application successfully deployed." + - cat index.html \ No newline at end of file diff --git a/build.py b/build.py index 383bff5..5c9a2b0 100644 --- a/build.py +++ b/build.py @@ -21,8 +21,7 @@ if __name__ == '__main__': logging.info('write file') with open('template/template.html') as inf: - os.mkdir('public') - with open('public/index.html', 'w') as outf: + with open('index.html', 'w') as outf: outf.write(inf.read().replace('',subst)) logging.info('done')