-
-
Notifications
You must be signed in to change notification settings - Fork 22
48 lines (41 loc) · 1.32 KB
/
update-website-after-desktop-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Update Website after Desktop Release
on:
workflow_dispatch: {}
release:
types: [released]
jobs:
update-website:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- 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: ${{ env.VERSION }}
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
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@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: website/public