~xenrox/custom-readme

a8d7fabc652fdbbe6a7ed8a58d3375b0de00503e — Thorben Günther 1 year, 5 months ago 9bb8255
Add build manifest
2 files changed, 17 insertions(+), 1 deletions(-)

A .build.yml
M readme.html
A .build.yml => .build.yml +10 -0
@@ 0,0 1,10 @@
image: archlinux
oauth: git.sr.ht/REPOSITORIES:RW git.sr.ht/PROFILE:RO
packages:
  - hut-git
sources:
  - https://git.xenrox.net/~xenrox/custom-readme
tasks:
  - update-readme: |
      cd custom-readme
      hut git update --readme readme.html

M readme.html => readme.html +7 -1
@@ 8,10 8,16 @@
</p>
<h2 id="setting-the-custom-readme">Setting the custom README</h2>
<p>
    Either use this command
    <code
        >hut git update --readme readme.html --repo
        https://git.xenrox.net/~xenrox/custom-readme</code
    >
    or use an automatic deployment with a
    <a
        href="https://git.xenrox.net/~xenrox/custom-readme/tree/master/item/.build.yml"
        >build manifest</a
    >.
</p>
<h2 id="removing-the-custom-readme">Removing the custom README</h2>
<p>


@@ 24,5 30,5 @@
<span class="hljs-comment"># find out the ID of your repository</span>
curl --oauth2-bearer <span class="hljs-variable">$TOKEN</span> https://git.sr.ht/query <span class="hljs-_">-d</span> <span class="hljs-string">'{"query": "query { me { repository(name: \"custom-readme\"){ id } }  }"}'</span>
<span class="hljs-comment"># remove custom README</span>
curl --oauth2-bearer <span class="hljs-variable">$TOKEN</span> https://git.sr.ht/query <span class="hljs-_">-d</span> <span class="hljs-string">'{"query": "mutation{ updateRepository(id: 70332, input: { readme: null }) { id }  }"}'</span>
curl --oauth2-bearer <span class="hljs-variable">$TOKEN</span> https://git.sr.ht/query <span class="hljs-_">-d</span> <span class="hljs-string">'{"query": "mutation{ updateRepository(id: 42, input: { readme: null }) { id }  }"}'</span>
</code></pre>