Skip to content
Snippets Groups Projects
Commit 30f9c6d0 authored by Rodriguez, Kelvin's avatar Rodriguez, Kelvin
Browse files

Merge branch 'main' into 'main'

CI build mkdocs and push to s3

See merge request astrogeology/asc-public-docs!5
parents 935e1ba8 1c300c72
No related branches found
No related tags found
No related merge requests found
# variables in gitlab:
# S3_BUCKET_NAME
# S3_BUCKET_SUBDIR
# AWS_ACCESS_KEY_ID
# AWS_SECRET_ACCESS_KET
# AWS_DEFAULT_REGION
stages:
- build
- deploy
"Build MkDocs":
image: "python:3"
stage: build
only:
- main
before_script:
- pip install -r requirements.txt
script:
- mkdocs build
artifacts:
paths:
- site/
"Sync with S3":
image: "python:3"
stage: deploy
dependencies:
- "Build MkDocs"
only:
- main
before_script:
- pip install awscli
- aws --version
script:
- aws s3 sync site/ s3://${S3_BUCKET_NAME}/${S3_BUCKET_SUBDIR} --delete
environment:
name: Site
url: http://${S3_BUCKET_NAME}.s3-website.${AWS_DEFAULT_REGION}.amazonaws.com/${S3_BUCKET_SUBDIR}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment