From faefd6f5f8ce19de0dda26038bcd06a77a47eb40 Mon Sep 17 00:00:00 2001 From: Hugo Bernier Date: Mon, 22 Apr 2024 21:00:09 -0400 Subject: [PATCH] Added automated deployment of Hugo --- .github/workflows/deploy-hugo.yml | 28 ++++++++++++++++++++++++++++ .github/workflows/update-ics.yaml | 6 +++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/deploy-hugo.yml diff --git a/.github/workflows/deploy-hugo.yml b/.github/workflows/deploy-hugo.yml new file mode 100644 index 00000000..26a18e99 --- /dev/null +++ b/.github/workflows/deploy-hugo.yml @@ -0,0 +1,28 @@ +name: Deploy Hugo Site + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: 'latest' + + - name: Build + run: hugo --minify + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./public \ No newline at end of file diff --git a/.github/workflows/update-ics.yaml b/.github/workflows/update-ics.yaml index 5f3d886b..a4e9aeac 100644 --- a/.github/workflows/update-ics.yaml +++ b/.github/workflows/update-ics.yaml @@ -4,7 +4,11 @@ on: workflow_dispatch: schedule: - cron: '0 */4 * * *' # Adjust the schedule as necessary - + workflow_run: + workflows: ["Deploy Hugo Site"] + types: + - completed + jobs: update-and-push: runs-on: ubuntu-latest