Compare commits
3 Commits
dcdacfa034
...
8b39e2c8ad
| Author | SHA1 | Date | |
|---|---|---|---|
| 8b39e2c8ad | |||
| b15474de3f | |||
|
|
d2fa4f8ee3 |
@@ -12,22 +12,36 @@ jobs:
|
||||
name: Deploy Hugo Website
|
||||
runs-on: self-hosted
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
container:
|
||||
image: debian:bookworm-slim
|
||||
|
||||
- name: Setup Hugo
|
||||
uses: peaceiris/actions-hugo@v2.6.0
|
||||
with:
|
||||
hugo-version: "0.108.0"
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y git curl ca-certificates
|
||||
|
||||
- name: Checkout code
|
||||
run: |
|
||||
git clone --recurse-submodules https://gitea.arnodo.fr/Damien/Notebook.git /workspace
|
||||
cd /workspace
|
||||
git checkout ${{ github.sha }}
|
||||
working-directory: /
|
||||
|
||||
- name: Install Hugo
|
||||
run: |
|
||||
curl -L https://github.com/gohugoio/hugo/releases/download/v0.108.0/hugo_0.108.0_linux-amd64.tar.gz -o hugo.tar.gz
|
||||
tar -xzf hugo.tar.gz
|
||||
mv hugo /usr/local/bin/
|
||||
hugo version
|
||||
|
||||
- name: Build site
|
||||
run: hugo
|
||||
working-directory: /workspace
|
||||
|
||||
- name: Deploy to S3
|
||||
run: hugo deploy --force --maxDeletes -1
|
||||
working-directory: /workspace
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.SCW_ACCESS_KEY }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.SCW_SECRET_KEY }}
|
||||
|
||||
Reference in New Issue
Block a user