Skip to content

Instantly share code, notes, and snippets.

@william-v4
Last active June 7, 2022 20:50
Show Gist options
  • Save william-v4/d520e74e3320fd1b05a2411d58d7b79c to your computer and use it in GitHub Desktop.
Save william-v4/d520e74e3320fd1b05a2411d58d7b79c to your computer and use it in GitHub Desktop.
basic Gitlab pages setup (put index.html and stuff at root)
pages:
stage: deploy
script:
- mkdir .public
- cp -r * .public
- mv .public public
artifacts:
paths:
- public

Set up a website on Gitlab Pages

  1. make sure files (index.html, style.css, index.js, etc) are at the root of the master branch
  2. make a file at the root of master branch called ".gitlab-ci.yml"
  3. copy pasta and save
  4. wait for pipeline to finish
  5. visit [username].gitlab.io/[project slug]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment