diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml new file mode 100644 index 0000000..81d0b3c --- /dev/null +++ b/.gitea/workflows/deploy.yaml @@ -0,0 +1,42 @@ +name: Deploy +run-name: ${{ gitea.actor }} is deploying ${{ gitea.repository }} +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + container: + image: docker.gitea.com/runner-images:ubuntu-latest + volumes: + - /opt/hugo/makyo.ink:/opt/hugo/makyo.ink + env: + DART_SASS_VERSION: 1.98.0 + steps: + - name: Check out repo + uses: actions/checkout@v6 + with: + submodules: 'true' + + - name: Install Hugo + uses: peaceiris/actions-hugo@v3 + with: + hugo-version: '0.157.0' + extended: true + + - name: Install Dart Sass + run: | + curl -LJO https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz \ + && tar -xf dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz \ + && cp -r dart-sass/* /usr/local/bin \ + && rm -rf dart-sass* \ + && sass --embedded --version + + - name: Build site + run: | + hugo build --gc --minify --baseURL https://makyo.ink --destination /opt/hugo/makyo.ink + + - name: Set permissions + run: chown -R www-data:www-data /opt/hugo/makyo.ink diff --git a/.gitignore b/.gitignore index 4821a79..421e603 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,3 @@ -_site -.sass-cache -.jekyll-metadata -.bundle -node_modules -resources .hugo_build.lock public +resources/_gen diff --git a/config.toml b/config.toml index 9e885b7..ef5e85e 100644 --- a/config.toml +++ b/config.toml @@ -9,7 +9,7 @@ title = "The Writing of Madison Rye Progress" series = "series" [permalinks] - post = "/:filename/" + post = "/:contentbasename/" [markup.goldmark.renderer] unsafe= true