aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKumar Damani <me@kumardamani.net>2026-07-24 04:46:36 +0000
committerKumar Damani <me@kumardamani.net>2026-07-24 04:46:36 +0000
commitf35fa6bf9824b2c240aaaa237441210f4eebcb03 (patch)
tree1b35842c6f4dd1b2511339703712e54979995fbf
parent3d615f7b4c19abf34f23ff09ea587a597f2de42a (diff)
updated ci
-rw-r--r--.gitignore1
-rw-r--r--.gitlab-ci.yml53
-rw-r--r--ci.json1
3 files changed, 33 insertions, 22 deletions
diff --git a/.gitignore b/.gitignore
index b895d04..9408c9a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
.direnv
build/
+ci.json
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 27dcf1e..d994137 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,24 +1,35 @@
-image: 'python:3-slim-buster'
-
-before_script:
- - 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
- - eval $(ssh-agent -s)
- - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- - mkdir -p ~/.ssh
- - chmod 700 ~/.ssh
- - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" >> ~/.ssh/config'
-
-stages:
- - deploy
+---
+render:
+ stage: build
+ image:
+ name: ghcr.io/typst/typst:v0.15.1
+ entrypoint: [""]
+ rules:
+ - if: $CI_COMMIT_BRANCH == "main"
+ changes:
+ - "**/*.typ"
+ script:
+ - >
+ printf '{ "date": "%s", "link": "%s" }\n'
+ "$(date '+%B %d, %Y' | sed 's/ 0/ /')" "$CI_JOB_URL" > ci.json
+ - ./build.sh
+ artifacts:
+ paths:
+ - build/
-deploy-job:
+deploy:
stage: deploy
+ image:
+ name: amazon/aws-cli:latest
+ entrypoint: [""]
+ rules:
+ - if: $CI_COMMIT_BRANCH == "main"
+ changes:
+ - "**/*.typ"
+ needs:
+ - render
script:
- - apt update -y && apt install -y git make sshpass
- - echo "Deploying application..."
- - git clone --branch master --depth 1 https://gitlab.com/kdam0/vps.git
- - cd vps
- - echo $VAULT_PASS > vaultid
- - make install
- - make run file=playbooks/deploy.yaml tags="websites" args="-v"
- - echo "Application successfully deployed!"
+ - >
+ aws --endpoint-url "$S3_ENDPOINT"
+ s3 sync build/ "s3://${S3_BUCKET_NAME}/${S3_UPLOAD_DIR}"
+ --delete --exclude "KumarDamaniCV.pdf"
diff --git a/ci.json b/ci.json
deleted file mode 100644
index d361606..0000000
--- a/ci.json
+++ /dev/null
@@ -1 +0,0 @@
-{ "date": "July 24, 2026", "link": "https://gitlab.com/kumardamani.net" }