Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix workflow #6

Merged
merged 22 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 27 additions & 12 deletions .github/workflows/build_website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,43 @@ on:
push:
branches:
- master
pull_request_target:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
deploy:
runs-on: scil-website-runners
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

steps:
- uses: actions/checkout@v4
- name: Install dependancies
run: |
sudo apt-get update
sudo apt-get install -y \
git rsync

- name: Checkout repository
uses: actions/[email protected]
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
submodules: ''

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

- name: Build
run: hugo -D -F -b "https://scil.usherbrooke.ca" -d scil.usherbrooke.ca
- name: Deploy
run: rsync --delete -r "$WORKSPACE/scil.usherbrooke.ca/" [email protected]:/var/www/bk_scil.usherbrooke.ca/

- name: rsync deployments
uses: burnett01/[email protected]
with:
switches: --delete -r
legacy_allow_rsa_hostkeys: "true"
path: scil.usherbrooke.ca/
remote_path: ${{ secrets.REMOTE_PATH }}
remote_host: ${{ secrets.REMOTE_HOST }}
remote_user: ${{ secrets.REMOTE_USER }}
arnaudbore marked this conversation as resolved.
Show resolved Hide resolved
remote_key: ${{ secrets.DEPLOY_KEY }}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
######################## default configuration ####################
baseURL = "https://scil.usherbrooke.ca/"
title = "SCIL"
theme = "scilus_website"
theme = "themefisher"
# post pagination
paginate = "3"
# post excerpt
Expand Down
File renamed without changes.
File renamed without changes.
Empty file removed exampleSite/.hugo_build.lock
Empty file.
16 changes: 0 additions & 16 deletions exampleSite/netlify.toml

This file was deleted.

20 changes: 14 additions & 6 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
[build]
publish = "exampleSite/public"
command = "cd exampleSite && hugo --gc --themesDir ../.."

publish = "public"
command = "hugo --minify --gc"
[build.environment]
HUGO_VERSION = "0.74.3"
HUGO_THEME = "repo"
HUGO_BASEURL = "/"
HUGO_VERSION = "0.87.0"
HUGO_BASEURL = "/"

[[headers]]
for = "/*" # This defines which paths this specific [[headers]] block will cover.

[headers.values]
X-Frame-Options = "DENY"
X-XSS-Protection = "1; mode=block"
Referrer-Policy = "same-origin"
Strict-Transport-Security = "max-age=31536000; includeSubDomains; preload"
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions themes/themefisher/netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[build]
publish = "exampleSite/public"
command = "cd exampleSite && hugo --gc --themesDir ../.."

[build.environment]
HUGO_VERSION = "0.74.3"
HUGO_THEME = "repo"
HUGO_BASEURL = "/"
File renamed without changes.
Loading