website/.gitea/workflows/build-workflow.yaml
Workflow config file is invalid. Please check your config file: Line: 4 Column 5: Failed to match string: Line: 4 Column 5: Expected a scalar got mapping Line: 4 Column 5: Failed to match sequence: Line: 4 Column 5: Expected a sequence got mapping Line: 4 Column 5: Failed to match on-mapping: Line: 5 Column 9: Failed to match null: Line: 5 Column 9: Expected a scalar got mapping Line: 5 Column 9: Failed to match workflow-call-mapping: Line: 5 Column 18: Expected a mapping got scalar Forgejo Actions YAML Schema validation error
norb 539618d957 feat: #32941 trigger build and deploy for specific branch
move main logic to seperate file and create seperate dev and prod
actions executed on develop and main branch respectiveley
2024-06-25 15:11:52 +02:00

59 lines
1.3 KiB
YAML

name: Build Hugo Site
on:
workflow_call:
secrets: inherit
jobs:
build-wrokflow:
env:
RUNNER_TOOL_CACHE: /toolcache
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- name: env-toml-file
uses: SebRollen/toml-action@v1.2.0
id: read_toml
with:
file: 'hugo.toml'
field: 'params.environment'
- name: Echo environment
run: echo "Environment is ${{ steps.read_toml.outputs.value }}"
- name: Set up Go
uses: actions/setup-go@v5.0.0
with:
go-version: '1.20.5'
- name: Set up Node.js
uses: actions/setup-node@v4.0.2
with:
node-version: '20'
cache: 'npm'
- name: Setup Project
run: npm run project-setup
- name: Install npm dependencies
run: npm install
- name: Set up Hugo Extended
uses: peaceiris/actions-hugo@v3.0.0
with:
hugo-version: '0.121.2'
extended: true
- name: Build Hugo site
run: hugo --minify
- name: Setup rsync
run: apt-get update && apt-get install -y rsync
- name: Setup SSH Key
uses: webfactory/ssh-agent@v0.5.3
with:
ssh-private-key: ${{ secrets.VFO_SSH_KEY }}