is-a-dev-docs

is-a.dev Documentation

git clone https://github.com/notamitgamer/is-a-dev-docs.git
· rebuilt hourlyOpen on GitHub
root / src / guides / codeberg-pages.md

codeberg-pages.md (1971B)


      1 ---
      2 order: 1700
      3 label: Codeberg Pages
      4 icon: /media/codeberg.svg
      5 tags: guides
      6 ---
      7 
      8 # Setting up Codeberg Pages with an is-a.dev subdomain
      9 
     10 This guide will walk you through the process of setting up a Codeberg Pages (or any git-pages host) website and pointing your is-a.dev subdomain to it.
     11 
     12 ## Create a Codeberg Pages Website
     13 
     14 First, you'll need to create a website on Codeberg Pages. Follow the instructions in the [Codeberg Pages Guide](https://docs.codeberg.org/codeberg-pages/).
     15 
     16 For detailed and alternative methods, see instructions on [git-pages.org](https://git-pages.org/) or [grebedoc.dev](https://grebedoc.dev/).
     17 
     18 ## Create the Domain File
     19 
     20 Create a JSON file inside domains directory (`domains/subdomain.json`) with the following content:
     21 
     22 ```json
     23 {
     24     "owner": {
     25         "username": "your-github-username"
     26     },
     27     "records": {
     28         "CNAME": "codeberg.page"
     29     }
     30 }
     31 ```
     32 
     33 ## Verifying Your Domain
     34 
     35 Create a JSON file inside domains directory (`domains/_git-pages-repository.subdomain.json`) with the following content:
     36 
     37 ```json
     38 {
     39     "owner": {
     40         "username": "your-github-username"
     41     },
     42     "records": {
     43         "TXT": "https://codeberg.org/USERNAME/REPOSITORY.git"
     44     }
     45 }
     46 ```
     47 
     48 ## Submit a Pull Request
     49 
     50 Make sure you have created the above two files properly, and then submit a Pull Request.
     51 
     52 ## Add a Repository Webhook
     53 
     54 - Navigate to the webhooks section of your Codeberg repository: <https://codeberg.org/USERNAME/REPOSITORY/settings/hooks>
     55 - Click `Add webhook` and select `Forgejo` in the dropdown menu.
     56 - Set `Target URL` to `https://subdomain.is-a.dev` and set `Branch filter` to `pages`
     57 - Now submit the form using `Add webhook` button at the bottom.
     58 
     59 Now, make sure your site's html and other content is stored in the `pages` branch of your repository.
     60 After your pull request is merged, you can do a push to the pages branch to activate your domain.
     61 
     62 ### Done!
     63 
     64 If you've followed everything correctly your website should be live :)