Skip to content

Commit

Permalink
extracted publishing in a script
Browse files Browse the repository at this point in the history
  • Loading branch information
tptodorov committed Oct 24, 2024
1 parent 1ff7e94 commit 9d284a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

for file in *.xlsx; do
echo "Uploading $file"
echo '"'$(base64 -i $file)'"' | curl -v --data-binary @- -H "x-myapiz-key: $SHEET_API_KEY" "https://api.myapiz.com/sheet/$file"
done
11 changes: 3 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
name: Publish spreadsheet to SheetAPI
on:
push:
paths:
- "*.xlsx"
# paths:
# - "*.xlsx"
branches:
- main
env:
Expand All @@ -18,9 +18,4 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: |
# iterate over all xlsx files in the repository
# and upload them to the SheetAPI
for file in *.xlsx; do
echo "Uploading $file"
curl --data-binary @$file -XPOST -H 'x-myapiz-key: ${SHEET_API_KEY}' 'https://api.myapiz.com/sheet/${file}'
done
sh .github/workflows/publish.sh

0 comments on commit 9d284a6

Please sign in to comment.