Skip to content

Commit

Permalink
Move GitLab pages deployment into a separate job file
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeychernyshev committed Mar 22, 2024
1 parent d6288e2 commit b12c053
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
17 changes: 1 addition & 16 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include:
- local: "/templates/gitterra.yml"
- local: "/templates/pages.yml"

stages:
- release
Expand All @@ -16,19 +17,3 @@ create-release:
release:
tag_name: $CI_COMMIT_TAG
description: "Release $CI_COMMIT_TAG of components repository $CI_PROJECT_PATH"

pages:
stage: play GitTerra
needs: [GitTerra]
script:
- mkdir public/
- mv index.html public/
- mv gitterra.json public/
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
19 changes: 19 additions & 0 deletions templates/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
stages:
- play GitTerra

pages:
stage: play GitTerra
image: node:latest
needs: [GitTerra]
script:
- mkdir public/
- mv index.html public/
- mv gitterra.json public/
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

0 comments on commit b12c053

Please sign in to comment.