forked from Skynet/deploy_user_hugo
Merging in changes
This commit is contained in:
commit
9c4fce1969
9 changed files with 133 additions and 15 deletions
|
@ -11,6 +11,11 @@ jobs:
|
|||
steps:
|
||||
# Step 1: Checkout the repository
|
||||
- uses: https://code.forgejo.org/actions/checkout@v4
|
||||
# Make sure all files are pulled down
|
||||
- uses: https://forgejo.skynet.ie/Skynet/actions/get_lfs@v6
|
||||
with:
|
||||
repository: ${{ gitea.repository }}
|
||||
ref_name: ${{ gitea.ref_name }}
|
||||
|
||||
# Step 2: Install latest Hugo
|
||||
- name: Install Hugo
|
||||
|
@ -24,15 +29,21 @@ jobs:
|
|||
- name: Initialize Submodules
|
||||
run: git submodule update --init --recursive
|
||||
|
||||
# Step 4: Build the Hugo site
|
||||
# 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 5: 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
|
||||
# Step 6: 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: "public"
|
||||
folder: "public"
|
||||
# uncomment below if you want to deploy to a subfolder
|
||||
#destination: "subfolder"
|
Loading…
Add table
Add a link
Reference in a new issue