Skip to content

Commit

Permalink
add GH
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulh committed Jan 31, 2024
1 parent 6b792fa commit 855eb0c
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and deploy on commit

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
lfs: true

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true

- name: Build
run: hugo --minify

- name: Compress archive
run: (cd public && tar -cvf ../archive.tar.zst --zstd .)

- name: Deploy to server
uses: JantHsueh/[email protected]
with:
url: https://doc-deploy.calaos.fr/deploy
forms: '{"key":"${{ secrets.deploy_key }}"}'
fileForms: '{"file":"archive.tar.zst"}'

0 comments on commit 855eb0c

Please sign in to comment.