Skip to content

Commit

Permalink
Update website
Browse files Browse the repository at this point in the history
  • Loading branch information
prof18 committed Sep 24, 2024
1 parent ed856f5 commit 6f02581
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/update-website-after-desktop-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Update Website after Desktop Release

on:
release:
types: [released]

jobs:
update-website:
runs-on: ubuntu-latest
steps:
- name: Create path variables
id: path_variables
run: |
tag=$(git describe --tags --abbrev=0 --match "*-desktop")
version=$(echo "$tag" | sed 's/-desktop$//')
echo "VERSION=$version" >> $GITHUB_ENV
- name: Update website
run: |
file_path="website/data/hero.yml"
new_link="https://github.com/prof18/feed-flow/releases/download/$VERSION-desktop/FeedFlow-$VERSION.dmg"
awk -v new_link="$new_link" '/^button3Link:/ {print "button3Link: " new_link; next} 1' "$file_path" > tmpfile && mv tmpfile "$file_path"
env:
VERSION: ${{ steps.path_variables.outputs.VERSION }}

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.101.0'
extended: true

- name: Build
run: |
cd website
HUGO_ENV=production hugo --gc --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: website/public
4 changes: 4 additions & 0 deletions website/data/hero.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ button2text: Apple Store
button2Link: https://apps.apple.com/us/app/feedflow-rss-reader/id6447210518
button3text: macOS
button3Link: https://github.com/prof18/feed-flow/releases/download/1.0.68-desktop/FeedFlow-1.0.68.dmg
button4text: Homebrew
button4Link: https://formulae.brew.sh/cask/feedflow
button5text: F-Droid
button5Link: https://f-droid.org/packages/com.prof18.feedflow/
image: images/hero/hero-image.svg
Loading

0 comments on commit 6f02581

Please sign in to comment.