Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Frontend
Commits
6c2aa6b9
Commit
6c2aa6b9
authored
5 years ago
by
Erwan Rouchet
Committed by
Bastien Abadie
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use GitLab CI environments for Surge
Learn more:
https://docs.gitlab.com/ee/ci/environments.html
parent
86fe9a1c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+25
-2
25 additions, 2 deletions
.gitlab-ci.yml
with
25 additions
and
2 deletions
.gitlab-ci.yml
+
25
−
2
View file @
6c2aa6b9
...
...
@@ -69,9 +69,32 @@ deploy-surge:
only
:
-
merge_requests
environment
:
name
:
${CI_COMMIT_REF_SLUG}
url
:
https://${CI_COMMIT_REF_SLUG}-teklia.surge.sh
on_stop
:
stop-surge
before_script
:
-
npm install -g surge
script
:
-
surge dist ${CI_ENVIRONMENT_URL}
stop-surge
:
stage
:
deploy
when
:
manual
# Do not try to checkout the branch if it was deleted
variables
:
GIT_STRATEGY
:
none
environment
:
name
:
${CI_COMMIT_REF_SLUG}
url
:
https://${CI_COMMIT_REF_SLUG}-teklia.surge.sh
action
:
stop
before_script
:
-
npm install -g surge
script
:
-
SLUG=$(echo ${CI_BUILD_REF_NAME} | sed 's/[^a-zA-Z0-9\-_]/-/g ; s/-\+/-/g')
-
surge dist ${SLUG}-teklia.surge.sh
-
surge teardown ${CI_ENVIRONMENT_URL}
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