update ci
This commit is contained in:
parent
f81643433f
commit
7971426e94
@ -24,10 +24,12 @@ build-job: # This job runs in the build stage, which runs first.
|
|||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- python build.py
|
- python build.py
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- index.html
|
||||||
|
|
||||||
deploy-job: # This job runs in the deploy stage.
|
deploy-job: # This job runs in the deploy stage.
|
||||||
stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
|
stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
|
||||||
environment: production
|
environment: production
|
||||||
script:
|
script:
|
||||||
- echo "Deploying application..."
|
- cat index.html
|
||||||
- echo "Application successfully deployed."
|
|
||||||
3
build.py
3
build.py
@ -21,8 +21,7 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
logging.info('write file')
|
logging.info('write file')
|
||||||
with open('template/template.html') as inf:
|
with open('template/template.html') as inf:
|
||||||
os.mkdir('public')
|
with open('index.html', 'w') as outf:
|
||||||
with open('public/index.html', 'w') as outf:
|
|
||||||
outf.write(inf.read().replace('<!--Placeholder-->',subst))
|
outf.write(inf.read().replace('<!--Placeholder-->',subst))
|
||||||
|
|
||||||
logging.info('done')
|
logging.info('done')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user