7
0
Fork 1
forked from Skynet/deploy_user

feat: copied in the pipeline Peace did

This commit is contained in:
silver 2025-02-13 14:01:52 +00:00
parent b52a477c51
commit 29d6b5a22c
Signed by: silver
GPG key ID: 36F93D61BAD3FD7D

View file

@ -18,11 +18,34 @@ jobs:
with:
repository: ${{ gitea.repository }}
ref_name: ${{ gitea.ref_name }}
# temp one just to get it "built"
# Step 2: Install latest Hugo
- name: Install Hugo
run: |
HUGO_VERSION=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep -Po '"tag_name": "\K[^"]+' | sed 's/^v//')
wget -q https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-amd64.deb
dpkg -i ./hugo_extended_${HUGO_VERSION}_Linux-amd64.deb
hugo version
# Step 3: Ensure submodules or themes are initialized (only needed if your using github submodules for theme purposes)
- name: Initialize Submodules
run: git submodule update --init --recursive
# Step 4: Set the correct URL for skynet
- name: Set the site URL correctly
run: sed -i 's%baseURL.*%baseURL=https://${{ env.GITHUB_REPOSITORY_OWNER }}.users.skynet.ie%' hugo.toml
# Step 4: Build the Hugo site
- name: Build Hugo site
env:
HUGO_ENV: production
run: hugo --minify # Reduce resources by minifying content
# Step 5: Deploy the /public directory to the server
- uses: https://forgejo.skynet.ie/Skynet/actions/deploy_user@v6
with:
ssh_key: ${{ secrets.SSH_KEY }}
username: ${{ env.GITHUB_REPOSITORY_OWNER }}
folder: "src"
folder: "public"
# uncomment below if you want to deploy to a subfolder
#destination: "subfolder"