Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GitHub pages for hosting #157

Merged
merged 2 commits into from
Jun 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 34 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
repository_dispatch:
types: [run_build]

permissions:
contents: read
pages: write
id-token: write

jobs:
prepare_jobs:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -51,40 +56,49 @@ jobs:
name: artifact-${{ env.PACKAGE }}
path: ${{ env.PACKAGE }}/*.pkg.tar.gz

create_release:
package_repo:
if: contains(github.ref,'refs/heads/master')
needs: [prepare_jobs, build]
runs-on: ubuntu-latest
container: ghcr.io/pspdev/pspsdk:latest

steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- name: Install dependencies
run: |
apk --update add build-base bash gpgme-dev libarchive-tools libarchive-dev libtool doxygen libcrypto3
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Create repo files
if: contains(github.ref,'refs/heads/master')
run: |
mkdir package
cp artifact-*/*.pkg.tar.gz package/
cd package
mkdir repo
cp artifact-*/*.pkg.tar.gz repo/
cd repo
${PSPDEV}/share/pacman/bin/repo-add pspdev.db.tar.gz *.pkg.tar.gz
- name: Upload files
if: contains(github.ref,'refs/heads/master')
uses: svenstaro/upload-release-action@v2
mv pspdev.db.tar.gz pspdev.db
mv pspdev.files.tar.gz pspdev.files
tar -cvf ../repo.tar ./*
- name: Upload repo artifact
uses: actions/upload-artifact@v4
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: package/*
overwrite: true
file_glob: true
tag: ${{ github.ref }}-${{ github.run_id }}
release_name: ${{ github.ref }} (${{ github.run_id }})
name: github-pages
path: repo.tar

publish_repo:
if: contains(github.ref,'refs/heads/master')
needs: [package_repo]
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

docker-layer:
if: contains(github.ref,'refs/heads/master')
needs: [create_release]

needs: [publish_repo]
runs-on: ubuntu-latest

steps:
Expand Down