Skip to content

Commit

Permalink
ci(gitlab-ci): 👷 add GitLab CI for automated deploys to CF Pages
Browse files Browse the repository at this point in the history
Alongside some redirects update

Signed-off-by: Andrei Jiroh Halili (RecapTime.dev) <[email protected]>
  • Loading branch information
ajhalili2006 committed Nov 12, 2024
1 parent 43e7876 commit 9144579
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ venv.bak/

# mkdocs documentation
site
public

# mypy
.mypy_cache/
Expand Down
2 changes: 2 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include:
- local: .gitlab/ci/*.yml
15 changes: 15 additions & 0 deletions .gitlab/ci/base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
image:
name: dock.mau.dev/andreijiroh-dev/docker-images/mkdocs-material:latest
entrypoint: ["/bin/bash", "-l", "-c"] # https://gitlab.com/gitlab-org/gitlab-runner/-/issues/2109#note_47480476

stages:
- test
- build

default:
tags:
- amd64 # Currently the CI image only available on amd64 for now
before_script:
- pipenv install --ignore-pipfile --deploy
- npm ci
- curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash
12 changes: 12 additions & 0 deletions .gitlab/ci/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
pages:
script:
- pipenv run build
- doppler run -- npm run deploy:prod
artifacts:
paths:
# The folder that contains the files to be exposed at the Page URL
- public
rules:
# This ensures that only pushes to the default branch will trigger
# a pages deploy
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
14 changes: 9 additions & 5 deletions content/_redirects
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# mediawiki compat redirects
/wiki/Main_Page /
/wiki/Handbook:Contents /handbook
/wiki/User:* https://profiles.loreooks.eu.org/:splat
/wiki/Portal:Contact_Squad https://recaptime.eu.org/contact
/wiki/User:* /profiles/:splat
/wiki/Portal:Contact_Squad https://recaptime.dev/contact

# aliases
/projects/lorebooks.wiki /projects/lorebooks-wiki

# keybase proofs
/keybase.txt /.well-known/keybase.txt
/security.txt https://recaptime.eu.org/.well-known/security.txt
/.well-known/security.txt https://recaptime.eu.org/.well-known/security.txt
/security.txt https://recaptime.dev/.well-known/security.txt
/.well-known/security.txt https://recaptime.dev/.well-known/security.txt

# quick golinks
/go/internal-handbook /handbook/handbook-usage#internal-handbook
/go/onboarding /handbook/company/general-onboarding.md
/go/coc https://policies.recaptime.eu.org/coc
/go/coc https://policies.recaptime.dev/code-of-conduct

0 comments on commit 9144579

Please sign in to comment.