2024-04-24 01:36:32 +00:00
|
|
|
steps:
|
2024-11-25 17:19:54 +00:00
|
|
|
tailwind:
|
2024-11-25 17:05:23 +00:00
|
|
|
image: alpine:latest
|
2024-04-24 01:36:32 +00:00
|
|
|
commands:
|
2024-11-25 17:19:54 +00:00
|
|
|
- apk add --no-cache curl
|
2024-11-25 17:05:23 +00:00
|
|
|
- curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/download/v3.4.15/tailwindcss-linux-x64
|
|
|
|
- chmod +x tailwindcss-linux-x64
|
|
|
|
- ./tailwindcss-linux-x64 -o static/styles.css --minify
|
2024-11-25 17:19:54 +00:00
|
|
|
|
|
|
|
zola:
|
|
|
|
image: alpine:latest
|
|
|
|
commands:
|
|
|
|
- apk add --no-cache zola
|
2024-11-25 14:43:21 +00:00
|
|
|
- zola build
|
2024-11-25 17:19:54 +00:00
|
|
|
- rm public/404.html public/robots.txt public/sitemap.xml
|
|
|
|
|
|
|
|
zip:
|
|
|
|
image: alpine:latest
|
|
|
|
commands:
|
|
|
|
- apk add --no-cache zip
|
2024-11-25 14:39:14 +00:00
|
|
|
- cd public
|
2024-10-07 08:25:32 +00:00
|
|
|
- zip -r project.zip . -x ".*"
|
2024-11-25 17:19:54 +00:00
|
|
|
- mv project.zip ..
|
|
|
|
|
|
|
|
upload:
|
|
|
|
image: alpine:latest
|
|
|
|
commands:
|
|
|
|
- apk add --no-cache curl
|
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-11-25 17:19:54 +00:00
|
|
|
|
2024-11-25 17:05:23 +00:00
|
|
|
when:
|
|
|
|
- event: manual
|
|
|
|
- event: push
|
|
|
|
branch: main
|