Skip to content

Commit

Permalink
feat(repo): publish to gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed Jul 9, 2024
1 parent 4635a84 commit 4585cf9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/build-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ jobs:
reflector --latest 10 --protocol http,https --sort rate --save /etc/pacman.d/mirrorlist
- name: Download Pacman Repo Builder
env:
VERSION: "0.0.0-rc.65"
URL_ASSET: "build-pacman-repo-x86_64-unknown-linux-gnu"
run: |
wget \
https://github.com/pacman-repo-builder/pacman-repo-builder/releases/download/0.0.0-rc.65/build-pacman-repo-x86_64-unknown-linux-gnu \
"https://github.com/pacman-repo-builder/pacman-repo-builder/releases/download/${VERSION}/{URL_ASSET}" \
-O /usr/bin/build-pacman-repo
chmod +x /usr/bin/build-pacman-repo
Expand All @@ -44,8 +47,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
ref: repo
path: repo
ref: gh-pages
path: gh-pages
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, will fail to push refs to dest repo

Expand All @@ -54,13 +57,17 @@ jobs:
build-pacman-repo patch-makepkg --replace
build-pacman-repo build
- name: Additional updates
run: |
cp -f README.md ./gh-pages/README.md
- name: GitHub Commit & Push
if: github.event_name == 'schedule' || github.event_name == 'push'
uses: actions-js/[email protected]
with:
author_email: ${{ secrets.GH_BOT_EMAIL }}
author_name: ${{ secrets.GH_BOT_NAME }}
branch: repo # commit to repo branch
directory: repo # use the repo directory
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GH_BOT_TOKEN }}
message: 'Update per ${{ github.event_name }}: ${{ github.sha }}'
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ Add the following code snippet to your `/etc/pacman.conf`:
```conf
[lizardbyte]
SigLevel = Optional
Server = https://raw.github.com/LizardByte/pacman-repo/repo
Server = https://app.lizardbyte.dev/pacman-repo
```

or:
```conf
[lizardbyte]
SigLevel = Optional
Server = https://raw.github.com/LizardByte/pacman-repo/gh-pages
```

Then, run `sudo pacman -Sy` to update repository.
Expand Down
2 changes: 1 addition & 1 deletion build-pacman-repo.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
global-settings:
repository: repo/repo.db.tar.gz
repository: gh-pages/repo.db.tar.gz
container: pkgbuilds
read-build-metadata: either
record-failed-builds: failed-builds.yaml
Expand Down

0 comments on commit 4585cf9

Please sign in to comment.