2024-04-24 01:36:32 +00:00
|
|
|
steps:
|
2024-11-25 14:39:14 +00:00
|
|
|
build:
|
|
|
|
image: alpine:edge
|
|
|
|
commands:
|
|
|
|
- apk add --no-cache zola
|
|
|
|
- zola build
|
|
|
|
- rm public/{robots.txt,sitemap.xml}
|
|
|
|
|
2024-04-24 01:36:32 +00:00
|
|
|
deploy:
|
2024-10-07 08:25:32 +00:00
|
|
|
image: alpine:latest
|
|
|
|
name: Zip files
|
2024-04-24 01:36:32 +00:00
|
|
|
commands:
|
2024-10-07 08:25:32 +00:00
|
|
|
- apk add --no-cache zip curl
|
2024-11-25 14:39:14 +00:00
|
|
|
- cd public
|
2024-10-07 08:25:32 +00:00
|
|
|
- zip -r project.zip . -x ".*"
|
2024-10-07 13:47:04 +00:00
|
|
|
- 'AUTH_HEADER="Authorization: Bearer $PAGES_API_KEY"'
|
|
|
|
- API_URL=https://pages.hadeedahmad.com/pages/me
|
|
|
|
- curl -s -w "%{http_code}" -F "zipfile=@project.zip" -H "$AUTH_HEADER" "$API_URL" | grep -q 200
|
|
|
|
|
|
|
|
secrets: [ PAGES_API_KEY ]
|
2024-04-24 01:58:49 +00:00
|
|
|
when:
|
2024-10-07 08:31:36 +00:00
|
|
|
- event: manual
|
2024-04-24 01:58:49 +00:00
|
|
|
- event: push
|
|
|
|
branch: main
|