From de3a244be1ce606d9db5946cdc4d90b9961a7abc Mon Sep 17 00:00:00 2001 From: mcraa <6892971+mcraa@users.noreply.github.com> Date: Thu, 5 Sep 2024 09:53:17 +0200 Subject: [PATCH] init gh-action --- .github/workflows/github-pages.yml | 32 ++++++++++++++++++++++++++++++ hugo.toml | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/github-pages.yml diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml new file mode 100644 index 0000000..25a814a --- /dev/null +++ b/.github/workflows/github-pages.yml @@ -0,0 +1,32 @@ +name: github pages + +on: + push: + branches: + - main + pull_request: + +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: + submodules: true # Fetch Hugo themes (true OR recursive) + fetch-depth: 0 + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: 'latest' + extended: true + + - name: Build + run: HUGO_ENV=production hugo --minify + + - name: Deploy + uses: peaceiris/actions-gh-pages@v4 + if: github.ref == 'refs/heads/main' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_branch: publish \ No newline at end of file diff --git a/hugo.toml b/hugo.toml index 7c6a24b..f0f55f3 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,4 +1,4 @@ -baseURL = 'https://example.org/' +baseURL = 'https://deviesdevelopment.github.io/opendevies/' languageCode = 'en-us' title = 'My New Hugo Site' theme = 'hugo-nederburg-theme'