Skip to content

Commit

Permalink
Add config for Github Actions and Hugo deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
TixieSalander committed Apr 21, 2024
1 parent 6fa0de6 commit 8921892
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/deploy-deuxfleurs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and deploy on Deuxfleurs infra
on:
workflow_dispatch:
push:
branches: deploy-to-deuxfleurs
jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: Setup Hugo
env:
HUGO_VERSION: 0.124.1
HUGO_ENV: "production"
run: |
curl -L "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz" --output hugo.tar.gz
tar -xvzf hugo.tar.gz
sudo mv hugo /usr/local/bin
- name: Build Hugo
env:
HUGO_ENV: "production"
run: |
hugo version
hugo -b ${{secrets.BASE_URL}}
- name: Deploy to Deuxfleurs
run: |
touch ~/.awsrc
echo "AWS_ACCESS_KEY_ID=${{secrets.AWS_ACCESS_KEY_ID}}" >> ~/.awsrc
echo "AWS_SECRET_ACCESS_KEY=${{secrets.AWS_SECRET_ACCESS_KEY}}" >> ~/.awsrc
source ~/.awsrc
hugo deploy
8 changes: 6 additions & 2 deletions config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
baseURL = "http://localhost:1313/"
baseURL = "http://localhost:1312/"
languageCode = "en-us"
title = "Now Playing"
mainSections = ["a"]
Expand All @@ -17,4 +17,8 @@ disableKinds = ["taxonomy"]
quality = 95
[security]
[security.funcs]
getenv = [ "^HUGO_", "CONTEXT", "URL" ]
getenv = [ "^HUGO_", "CONTEXT", "URL", "BASE_URL" ]
## Deploy into a Garage bucket at Deuxfleurs
[[deployment.targets]]
name = "deuxfleurs"
URL = "s3://now-playing.web.deuxfleurs.fr&endpoint=garage.deuxfleurs.fr&region=garage&s3ForcePathStyle=true"

0 comments on commit 8921892

Please sign in to comment.