Skip to content

Commit

Permalink
refactor: Update CI/CD configuration, add light/dark icon variations
Browse files Browse the repository at this point in the history
Signed-off-by: Felicitas Pojtinger <[email protected]>
  • Loading branch information
pojntfx committed Jul 15, 2024
1 parent 5e327be commit 6d6e26c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
33 changes: 20 additions & 13 deletions .github/workflows/hydrun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,29 @@ on:

jobs:
build-linux:
runs-on: ubuntu-latest
runs-on: ${{ matrix.target.runner }}
permissions:
contents: read
packages: write
id-token: write
strategy:
matrix:
target:
- id: pwa
src: .
os: golang:alpine
flags: ""
flags: -e '-v /tmp/ccache:/root/.cache/go-build'
cmd: ./Hydrunfile pwa
dst: out/*
runner: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Restore ccache
uses: actions/cache/restore@v4
with:
path: |
/tmp/ccache
key: cache-ccache-${{ matrix.target.id }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand All @@ -39,6 +44,12 @@ jobs:
run: hydrun -o ${{ matrix.target.os }} ${{ matrix.target.flags }} "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} ${{ matrix.target.cmd }}"
- name: Fix permissions for output
run: sudo chown -R $USER .
- name: Save ccache
uses: actions/cache/save@v4
with:
path: |
/tmp/ccache
key: cache-ccache-${{ matrix.target.id }}
- name: Upload output
uses: actions/upload-artifact@v4
with:
Expand All @@ -63,7 +74,7 @@ jobs:
uses: actions/download-artifact@v4
with:
path: /tmp/out
- name: Isolate the PWA from the other artifacts
- name: Isolate the repositories
run: |
mkdir -p /tmp/github-pages
tar xvzf /tmp/out/pwa/*.tar.gz -C /tmp/github-pages
Expand All @@ -73,30 +84,26 @@ jobs:
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
- name: Publish pre-release to GitHub releases
if: ${{ github.ref == 'refs/heads/main' }}
uses: marvinpinto/action-automatic-releases@latest
uses: softprops/action-gh-release@v2
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: release-${{ steps.extract_branch.outputs.branch }}
tag_name: release-${{ steps.extract_branch.outputs.branch }}
prerelease: true
files: |
/tmp/out/*/*
- name: Publish release to GitHub releases
if: startsWith(github.ref, 'refs/tags/v')
uses: marvinpinto/action-automatic-releases@latest
uses: softprops/action-gh-release@v2
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
/tmp/out/*/*
- name: Setup GitHub Pages
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/configure-pages@v5
- name: Upload GitHub Pages artifact
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-pages-artifact@v3
with:
path: /tmp/github-pages/
- name: Publish to GitHub pages
if: startsWith(github.ref, 'refs/tags/v')
id: publish
uses: actions/deploy-pages@v4

5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<img alt="Project icon" style="vertical-align: middle;" src="./docs/icon-light.svg" width="128" height="128" align="left">
<picture width="128" height="128" align="left">
<source media="(prefers-color-scheme: dark)" srcset="./docs/icon-dark.svg">
<img alt="Project icon" src="./docs/icon-light.svg" width="128" height="128" align="left">
</picture>

# Morniteaque Site

Expand Down

0 comments on commit 6d6e26c

Please sign in to comment.