All checks were successful
Build and Publish Web / build (push) Successful in 1m8s
48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
name: Build and Publish Web
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Code checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '18'
|
|
|
|
- name: Hugo Setup
|
|
uses: peaceiris/actions-hugo@v2
|
|
with:
|
|
hugo-version: 'latest'
|
|
extended: true
|
|
|
|
- name: Web Build
|
|
run: |
|
|
cd themes/minimal-black
|
|
npm install
|
|
cd ../..
|
|
hugo --minify -b "https://jirkabuilds.dev/"
|
|
|
|
- name: Packaging ZIP
|
|
run: |
|
|
cd public
|
|
zip -r ../build.zip ./*
|
|
|
|
- name: Uploading package back to gitea
|
|
run: |
|
|
curl --user "${{ github.actor }}:${{ secrets.PACKAGE_TOKEN }}" \
|
|
--upload-file build.zip \
|
|
"https://git.jirkabuilds.dev/api/packages/${{ github.repository_owner }}/generic/hugo-build/latest/web.zip"
|
|
|
|
- name: Trigger Webhook
|
|
run: |
|
|
curl -X POST "https://hooks.jirkabuilds.dev/hooks/deploy-web" \
|
|
-H "X-Deploy-Token: ${{ secrets.WEBHOOK_SECRET }}"
|
|
|