62 lines
1.5 KiB
YAML
62 lines
1.5 KiB
YAML
name: Deploy Hugo site to Pages
|
|
|
|
on:
|
|
push:
|
|
branches: ["master"]
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: "pages"
|
|
cancel-in-progress: false
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
- name: Setup Pages
|
|
id: pages
|
|
uses: actions/configure-pages@main
|
|
- uses: DeterminateSystems/nix-installer-action@main
|
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
|
- uses: DeterminateSystems/flake-checker-action@main
|
|
- name: Build with Hugo
|
|
run: |
|
|
nix develop --command bash -c "hugo \
|
|
--environment production \
|
|
--minify \
|
|
--baseURL '${{ steps.pages.outputs.base_url }}/'"
|
|
- name: Upload to GitHub Pages
|
|
uses: actions/upload-pages-artifact@main
|
|
with:
|
|
path: ./public
|
|
- name: Upload to Netim FTP
|
|
uses: SamKirkland/FTP-Deploy-Action@main
|
|
with:
|
|
server: ftp.netim.hosting
|
|
username: AS12798_FTP1
|
|
password: ${{ secrets.ftp_password }}
|
|
local-dir: ./public/
|
|
server-dir: jankremer.eu/public_www/
|
|
|
|
deploy:
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@main
|