Initial commit #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
env: | |
CI_XBPS_PACKAGES: "xdeb-install" | |
XBPS_ALLOW_CHROOT_BREAKOUT: "yes" | |
jobs: | |
build: | |
permissions: | |
packages: read | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Create XBPS packages | |
run: | | |
mkdir ./void | |
wget https://repo-default.voidlinux.org/live/current/void-x86_64-ROOTFS-20230628.tar.xz | |
tar xvf void-x86_64-ROOTFS-20230628.tar.xz -C ./void | |
sudo mount -t proc none ./void/proc | |
sudo mount -t sysfs none ./void/sys | |
sudo mount --rbind /dev ./void/dev | |
sudo mount --rbind /run ./void/run | |
sudo cp /etc/resolv.conf ./void/etc/resolv.conf | |
sudo cp scripts/create_packages.sh ./void/tmp | |
sudo mv void-packages ./void/tmp/void-packages | |
sudo chroot ./void xbps-install -Su xbps | |
sudo chroot ./void xbps-install -u | |
sudo chroot ./void xbps-install base-system | |
sudo chroot ./void xbps-remove base-voidstrap | |
sudo chroot ./void xbps-install git cmake python3 tar shadow util-linux xtools grep | |
sudo chroot ./void cd /tmp && ./create_packages.sh | |
umount -R ./void | |
rm -rf .void | |
sudo mv ./void/tmp/repositories . | |
sudo chown -R $(id -u):$(id -g) repositories | |
- name: Create XBPS repository | |
run: | | |
echo -n "${{ secrets.XBPS_REPOSITORY_KEY }}" > private.pem | |
./scripts/sign_repository.sh "${{ github.repository_owner }}" "${{ github.event.pusher.email }}" | |
- name: Build apindex | |
run: | | |
cd apindex | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_INSTALL_PREFIX=/tmp/apindex | |
make install | |
- name: Generate index.html | |
run: cd repository && /tmp/apindex/bin/apindex . | |
- name: Upload Pages artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: repository | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |