diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..ca080b6 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,35 @@ +# .gitea/workflows/build.yaml +name: Build Hugo Site +run-name: Static Site Generation +on: [push] +jobs: + build: + runs-on: ubuntu-latest + env: + HUGO_VERSION: 0.114.0 + steps: + - name: Install Hugo CLI + run: | + wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ + && sudo dpkg -i ${{ runner.temp }}/hugo.deb + - name: Install Dart Sass + run: sudo snap install dart-sass + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Install Node.js dependencies + run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" + - name: Build with Hugo + env: + HUGO_ENVIRONMENT: production + HUGO_ENV: production + run: | + hugo \ + --minify + deploy: + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to Server + run: scp public/* SSH_URL \ No newline at end of file