This commit is contained in:
parent
80844ce349
commit
d7f20cd07d
1 changed files with 32 additions and 24 deletions
|
@ -1,33 +1,41 @@
|
||||||
on: [push]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
image: python:3.12-slim
|
image: node:alpine
|
||||||
|
env:
|
||||||
|
ZONA: https://git.ficd.sh/ficd/zona.git
|
||||||
|
site: ficd.sh
|
||||||
|
site_draft: draft.ficd.sh
|
||||||
steps:
|
steps:
|
||||||
- name: Install uv
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
apt-get update && \
|
apk add --no-cache coreutils uv hut git
|
||||||
apt-get install -y curl ca-certificates && \
|
|
||||||
curl -LsSf https://astral.sh/uv/install.sh | bash
|
|
||||||
- name: Install git
|
|
||||||
run: |
|
|
||||||
apt-get update && apt-get install -y git
|
|
||||||
- name: Install hut
|
|
||||||
run: |
|
|
||||||
apt-get update && apt-get install -y hut
|
|
||||||
- name: Install node
|
|
||||||
run: |
|
|
||||||
apt-get update && apt-get install -y curl gnupg ca-certificates && \
|
|
||||||
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
|
|
||||||
apt-get install -y nodejs
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
# - name: Configure hut
|
- name: build
|
||||||
# run: |
|
|
||||||
# apk add hut
|
|
||||||
# echo ${{ secrets.HUT }} | hut init
|
|
||||||
- name: Build
|
|
||||||
run: |
|
run: |
|
||||||
cd $GITHUB_WORKSPACE
|
cd $GITHUB_WORKSPACE
|
||||||
uv run --with "https://git.ficd.sh/ficd/zona.git" zona build --output public
|
uvx "$ZONA" build --output public
|
||||||
ls public
|
- name: package
|
||||||
|
run: |
|
||||||
|
cd $GITHUB_WORKSPACE/public
|
||||||
|
tar -cvz . > ../public.tar.gz
|
||||||
|
- name: build draft
|
||||||
|
run: |
|
||||||
|
cd $GITHUB_WORKSPACE
|
||||||
|
uvx "$ZONA" build --output public-draft --draft
|
||||||
|
- name: package draft
|
||||||
|
run: |
|
||||||
|
cd $GITHUB_WORKSPACE/public-draft
|
||||||
|
tar -cvz . > ../public-draft.tar.gz
|
||||||
|
- name: authenticate hut
|
||||||
|
run: |
|
||||||
|
echo "${{ secrets.HUT_TOKEN }}" | hut init >/dev/null
|
||||||
|
- name: deploy main
|
||||||
|
run: hut pages publish -d "$site" "$GITHUB_WORKSPACE/public.tar.gz"
|
||||||
|
- name: deploy draft
|
||||||
|
run: hut pages publish -d "$site" "$GITHUB_WORKSPACE/public-draft.tar.gz"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue