diff --git a/.gitea/workflows/test-hugo.yaml b/.gitea/workflows/test-hugo.yaml new file mode 100644 index 0000000..e9f23cb --- /dev/null +++ b/.gitea/workflows/test-hugo.yaml @@ -0,0 +1,38 @@ +name: Hugo Release Test +on: [push] # Se déclenche à chaque push + +jobs: + build-release: + runs-on: ubuntu-latest # Le label par défaut du runner + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install Hugo + run: | + apt-get update && apt-get install -y wget + wget https://github.com/gohugoio/hugo/releases/download/v0.121.1/hugo_extended_0.121.1_linux-amd64.tar.gz + tar -xzf hugo_extended_0.121.1_linux-amd64.tar.gz + mv hugo /usr/local/bin/ + + - name: Create Hugo Site + run: | + hugo new site my-test-app + cd my-test-app + echo "Title: My Talos Test" > config.toml + mkdir content + echo "---" > content/_index.md + echo "title: 'Hello Talos'" >> content/_index.md + echo "---" >> content/_index.md + hugo + + - name: Archive Release + run: | + tar -czvf release-app.tar.gz public/ + ls -lh release-app.tar.gz + + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: hugo-package + path: release-app.tar.gz