Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Asc Public Docs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
aflab
astrogeology
Asc Public Docs
Commits
97dfebd8
Unverified
Commit
97dfebd8
authored
1 year ago
by
Kelvin Rodriguez
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Update .gitlab-ci.yml
parent
2dfd1902
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+31
-69
31 additions, 69 deletions
.gitlab-ci.yml
with
31 additions
and
69 deletions
.gitlab-ci.yml
+
31
−
69
View file @
97dfebd8
# variables in gitlab:
image
:
continuumio/miniconda3:latest
# S3_BUCKET_NAME
# S3_BUCKET_SUBDIR
# AWS_ACCESS_KEY_ID
# AWS_SECRET_ACCESS_KET
# AWS_DEFAULT_REGION
stages
:
clone_github
:
-
build
-
test
-
deploy
"
Build
MkDocs"
:
image
:
"
python:3"
stage
:
build
before_script
:
-
pip install -r requirements.txt
script
:
-
mkdocs build
artifacts
:
paths
:
-
site/
"
Spell
Check
Docs"
:
image
:
"
python:3"
stage
:
test
before_script
:
-
pip install codespell
script
:
-
codespell site/
"
Link
Check
Docs"
:
image
:
"
python:3"
stage
:
test
before_script
:
-
pip install linkchecker
script
:
-
linkchecker site/index.html --ignore-url '(asc-public-docs/site/docs/software/|manuals/)'
"
Grammar
Check
Docs"
:
image
:
"
node:latest"
stage
:
test
before_script
:
-
npm i gramma -g
script
:
-
git diff --name-only origin/main | grep -e .md -e .MD | sed 's/^/"/;s/$/"/' | xargs -t -L1 gramma check -p ||
true
allow_failure
:
exit_codes
:
-
1
"
Sync
with
S3"
:
image
:
"
python:3"
stage
:
deploy
stage
:
deploy
dependencies
:
image
:
ubuntu:18.04
-
"
Build
MkDocs"
only
:
-
main
before_script
:
before_script
:
-
pip install awscli
-
apt-get update -y && apt-get install openssh-client -y
-
aws --version
-
apt install git -y
-
eval $(ssh-agent -s)
-
echo "$GIT_SSH_PRIVATE_KEY" | openssl base64 -A -d | ssh-add -
-
mkdir -p ~/.ssh
-
chmod 700 ~/.ssh
-
ssh-keyscan $GIT_LAB_HOST >> ~/.ssh/known_hosts
-
chmod 644 ~/.ssh/known_hosts
-
git config --global user.name "krodriguez"
-
git config --global user.email "krodriguez@usgs.gov"
-
ssh "git@$GIT_LAB_HOST"
script
:
script
:
-
aws s3 sync site/ s3://${S3_BUCKET_NAME}/${S3_BUCKET_SUBDIR} --delete
-
echo $SOURCE_REPOSITORY
environment
:
-
git config --global http.sslVerify
false
name
:
Site
-
rm -rf spiceql
# Needed to allow multiple CI runs
url
:
http://${S3_BUCKET_NAME}.s3-website.${AWS_DEFAULT_REGION}.amazonaws.com/${S3_BUCKET_SUBDIR}
-
git config --global user.name "krodriguez"
-
git config --global user.email "krodriguez@usgs.gov"
-
git clone --mirror https://github.com/DOI-USGS/asc-public-docs.git asc-public-docs
-
cd spiceql
-
git remote remove origin
-
git remote add origin $DESTINATION_REPOSITORY
-
git push -f --prune --all
-
git push -f --prune --tags
only
:
-
branches
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment