Skip to content
Snippets Groups Projects
Commit 1d05cdc3 authored by Jérôme Charaoui's avatar Jérôme Charaoui :telescope:
Browse files

trigger branch creation during new commit in webide

Instead of manually creating an empty branch and triggering a useless CI
build.
parent 08a08e91
No related branches found
No related tags found
No related merge requests found
......@@ -8,40 +8,34 @@ title: Blog
## How to write a new blog post
### Create a new branch
### Enter the Web IDE
#### 1. Navigate to the GitLab blog project at https://gitlab.torproject.org/tpo/web/blog/-/branches
#### 1. Navigate to the GitLab blog project at https://gitlab.torproject.org/tpo/web/blog
* To create a new branch, your account will require `Developper` permissions
on the project
* We'll create a new branch in the repository, so your account will require
`Developper` permissions in the project
#### 2. Click the blue `New branch` button on the top left corner of the page
#### 3. Enter a short name for the branch, without spaces
* `Create from` should specify `main`
### Edit the content file
#### 4. Click the `Web IDE` button just above the file listing
#### 2. Click the `Web IDE` button just above the file listing
* The GitLab Web IDE allows you to create a new commit right in your browser,
without the `git` command-line client
#### 5. On the left column, click the `New Directory` icon
### Edit the content file
#### 3. On the left column, click the `New Directory` icon
#### 6. Enter `content/blog/<blog-post-slug>`
#### 4. Enter `content/blog/<blog-post-slug>`
* `<blog-post-slug>` will constitute the URL part after
`https://blog.torproject.org/` (also called the permalink)
#### 7. In the left column still, navigate to the new directory and open the drop-down menu to the right of the new directory item
#### 5. In the left column still, navigate to the new directory and open the drop-down menu to the right of the new directory item
#### 8. Click `New file` to create a new file in that directory
#### 6. Click `New file` to create a new file in that directory
#### 9. Enter `contents.lr` as the new file name
#### 7. Enter `contents.lr` as the new file name
#### 10. In the text editor which appears, draft the new blog post
#### 8. In the text editor which appears, draft the new blog post
* Required fields are `title`, `author`, `pub_date`, `summary` and `body` and
`categories` ([sample contents.lr](#sample-contentslr))
......@@ -55,7 +49,7 @@ title: Blog
### Upload images and/or attachments
#### 11. Upload the lead image and any other images or attachments in the same directory
#### 9. Upload the lead image and any other images or attachments in the same directory
* The lead image must be uploaded as `lead.png`, `lead.jpg` or `lead.gif`
......@@ -72,14 +66,16 @@ title: Blog
### Create a new commit
#### 12. When finished drafting the new blog post, click `Commit..`
#### 10. When finished drafting the new blog post, click `Commit..`
* Look for a blue button in the lower-left corner
* The `Commit to <branchname> branch` and `Start new merge request` options
should remain selected
* Ensure `Create a new branch` is selected and (optionally) enter a branch
name in the field below (eg. `nov-2021-yec-post`)
* Ensure `Start new merge request` is checked
#### 13. Click once more the `commit` button
#### 11. Click once more the `Commit` button
* Prefix the Merge request title with `Draft:` to indicate the post is not yet
ready to be merged
......@@ -90,12 +86,12 @@ title: Blog
* Once the build is ready, a `View app` button should appear in the merge
request: clicking this link will open a browser tab to the preview URL
#### 14. Add more commits if any changes or adjustments are needed
#### 12. Add more commits if any changes or adjustments are needed
* New commits on the branch will automatically trigger a new preview build and
deployment
#### 15. Once the blog post is finalized, retitle the Merge request to remove the `Draft:` prefix
#### 13. Once the blog post is finalized, retitle the Merge request to remove the `Draft:` prefix
* Once the merge request is reviewed and accepted by a project maintainer,
a full project build will be triggered and deployed to
......@@ -109,7 +105,7 @@ title: Blog
### Comment topic
#### 16. When the blog post is published, visit the page with a javascript-enabled browser
#### 14. When the blog post is published, visit the page with a javascript-enabled browser
* This will trigger the Discourse forum to create a new topic with the contents
of the blog post in the [News][] category.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment