mirror of
https://github.com/ivabus/www
synced 2024-09-20 19:30:47 +03:00
Merge pull request #118 from teaxyz/feature/fetch-packages-before-build
prebuild action: copy packages.json summary from dist.tea.xyz bucket
This commit is contained in:
commit
75b532138d
4
.github/build-package-pages.sh
vendored
4
.github/build-package-pages.sh
vendored
|
@ -6,12 +6,12 @@ for row in $(cat $1 | jq -r '.[] | @base64'); do
|
||||||
_jq() {
|
_jq() {
|
||||||
echo ${row} | base64 --decode | jq -r ${1}
|
echo ${row} | base64 --decode | jq -r ${1}
|
||||||
}
|
}
|
||||||
touch $2/$(_jq '.name').md
|
touch $2/$(_jq '.slug').md
|
||||||
content="---
|
content="---
|
||||||
type: page
|
type: page
|
||||||
title: \"$(_jq '.name')\"
|
title: \"$(_jq '.name')\"
|
||||||
Description: \"$(_jq '.desc')\"
|
Description: \"$(_jq '.desc')\"
|
||||||
layout: \"package-detail\"
|
layout: \"package-detail\"
|
||||||
---"
|
---"
|
||||||
echo "$content" > $2/$(_jq '.name').md
|
echo "$content" > $2/$(_jq '.slug').md
|
||||||
done
|
done
|
9
.github/workflows/cd.yml
vendored
9
.github/workflows/cd.yml
vendored
|
@ -25,8 +25,13 @@ jobs:
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
# TODO:
|
- name: Copy packages.json summary from dist.tea.xyz
|
||||||
# add action here to download updates packages.json into src/data/packages.json
|
uses: prewk/s3-cp-action@v2
|
||||||
|
with:
|
||||||
|
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
|
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
source: 's3://dist.tea.xyz/packages.json'
|
||||||
|
dest: './src/data/packages.json'
|
||||||
|
|
||||||
- name: Create Package Detail Pages from packages.json
|
- name: Create Package Detail Pages from packages.json
|
||||||
uses: getneil/jq-action@v1
|
uses: getneil/jq-action@v1
|
||||||
|
|
9
.github/workflows/staging.yml
vendored
9
.github/workflows/staging.yml
vendored
|
@ -33,8 +33,13 @@ jobs:
|
||||||
echo "relativeurls = true" >>config.toml
|
echo "relativeurls = true" >>config.toml
|
||||||
working-directory: src
|
working-directory: src
|
||||||
|
|
||||||
# TODO:
|
- name: Copy packages.json summary from dist.tea.xyz
|
||||||
# add action here to download updates packages.json into src/data/packages.json
|
uses: prewk/s3-cp-action@v2
|
||||||
|
with:
|
||||||
|
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
|
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
source: 's3://dist.tea.xyz/mock_packages.json'
|
||||||
|
dest: './src/data/packages.json'
|
||||||
|
|
||||||
- name: Create Package Detail Pages from packages.json
|
- name: Create Package Detail Pages from packages.json
|
||||||
uses: getneil/jq-action@v1
|
uses: getneil/jq-action@v1
|
||||||
|
|
|
@ -36,6 +36,6 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
<a href="/packages/{{- .name -}}/">
|
<a href="/packages/{{- .slug -}}/">
|
||||||
<button class="detail-btn"><i class="icon-enter-arrow"></i>details</button>
|
<button class="detail-btn"><i class="icon-enter-arrow"></i>details</button>
|
||||||
</a>
|
</a>
|
|
@ -22,7 +22,7 @@
|
||||||
{{- partial "detail-btn.html" . -}}
|
{{- partial "detail-btn.html" . -}}
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body thumbnail-body-mobile">
|
<div class="card-body thumbnail-body-mobile">
|
||||||
<a href="/packages/{{- .name -}}/">
|
<a href="/packages/{{- .slug -}}/">
|
||||||
<button class="detail-btn-mobile"><i class="icon-enter-arrow"></i>details</button>
|
<button class="detail-btn-mobile"><i class="icon-enter-arrow"></i>details</button>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
BIN
src/static/Images/package-thumb-nolabel5.jpg
Normal file
BIN
src/static/Images/package-thumb-nolabel5.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 219 KiB |
BIN
src/static/Images/package-thumb-nolabel6.jpg
Normal file
BIN
src/static/Images/package-thumb-nolabel6.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 54 KiB |
BIN
src/static/Images/package-thumb-nolabel7.jpg
Normal file
BIN
src/static/Images/package-thumb-nolabel7.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 60 KiB |
BIN
src/static/Images/package-thumb-nolabel8.jpg
Normal file
BIN
src/static/Images/package-thumb-nolabel8.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 91 KiB |
Loading…
Reference in a new issue