This is some exploration of deploying quartowebsite at gitlab # 1 Connect local git with git repository # 1.1 build an empty git project Use public setting ![image](https://hackmd.io/_uploads/HkG-11esa.png) # 1.2 Create quaro website at local file-->New Project-->Quarto Website It is recommended that the name of your repository should be exactly the same as the local. # 1.3 connect 2 things Now the empty project and git is not connected.You need to make some commitment locally first(whatever change). Then Got to teminal `git remote add origin https://gitlab.com/YingxiaoYan/web_demo.git ` Use URL so that it is easier for you ` git remote set-url origin https://gitlab.com/YingxiaoYan/web_demo.git ` Check if things are good `git remote -v` Push up what is commited locally to gitlab Diff-->write something-->commit Then do` git push -u origin master ` The pushed things should show up on yyour gitlab and on you rRStudio the pull and push button should be activated. # 2. Quarto website settings ## 2.1 set up .gitlab-ci.yml Create a new yml file called `.gitlab-ci.yml`. This can be done by building a text file ![image](https://hackmd.io/_uploads/rJHXbJesp.png) Make the file contains the following(we randomly write smth under script) pages: stage: deploy script: - ls artifacts: paths: - public ![image](https://hackmd.io/_uploads/ByOXgkxoT.png) ## 2.2 set up _quarto.yml `output-dir: public` This is the most important thing. Unlike github, gitlab save all the produced file in a folder called publix `project: type: website output-dir: public website: title: "websi" navbar: left: - href: index.qmd text: Home - about.qmd format: html: theme: cosmo css: styles.css toc: true editor: visual` ![image](https://hackmd.io/_uploads/Bkg4lkgop.png) ## 2.3 render Render website in your RStudio. A folder called `public` should be generated. Delete the folder called `_site` id there is one. Commit and push new generated stuff ## 2.4 deployment The deploymet is automatic activated in gitlab. Go to gitlab and you will understand ## 2.5 get your link Check the website link by going to deploy-->pages ![image](https://hackmd.io/_uploads/SyrerJxjT.png) # 3. The actual website- tutorial # 4. The actual website