From 79a704815bba2732df2443c52c8fb8c1a3b2dec5 Mon Sep 17 00:00:00 2001 From: hashp4 Date: Wed, 11 Oct 2023 17:11:00 +0200 Subject: [PATCH] Adding config --- .github/workflows/deploy.yml | 40 ++++++++++++++++++++++++++++++++++++ .hugo_build.lock | 0 archetypes/default.md | 5 +++++ hugo.yml | 4 ++++ 4 files changed, 49 insertions(+) create mode 100644 .github/workflows/deploy.yml create mode 100644 .hugo_build.lock create mode 100644 archetypes/default.md create mode 100644 hugo.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..53e134a --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,40 @@ +name: Publish to GH Pages +on: + push: + branches: + - main + pull_request: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout source + uses: actions/checkout@v3 + with: + submodules: true + + - name: Checkout destination + uses: actions/checkout@v3 + if: github.ref == 'refs/heads/main' + with: + ref: gh-pages + path: built-site + + - name: Setup Hugo + run: | + curl -L -o /tmp/hugo.tar.gz 'https://github.com/gohugoio/hugo/releases/download/v0.110.0/hugo_extended_0.110.0_linux-amd64.tar.gz' + tar -C ${RUNNER_TEMP} -zxvf /tmp/hugo.tar.gz hugo + - name: Build + run: ${RUNNER_TEMP}/hugo + + - name: Deploy + if: github.ref == 'refs/heads/main' + run: | + cp -R public/* ${GITHUB_WORKSPACE}/built-site/ + cd ${GITHUB_WORKSPACE}/built-site + git add . + git config user.name 'dhij' + git config user.email 'davidhwang.ij@gmail.com' + git commit -m 'Updated site' + git push \ No newline at end of file diff --git a/.hugo_build.lock b/.hugo_build.lock new file mode 100644 index 0000000..e69de29 diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..c6f3fce --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,5 @@ ++++ +title = '{{ replace .File.ContentBaseName "-" " " | title }}' +date = {{ .Date }} +draft = true ++++ diff --git a/hugo.yml b/hugo.yml new file mode 100644 index 0000000..214796a --- /dev/null +++ b/hugo.yml @@ -0,0 +1,4 @@ +baseURL: "https://milfctf.github.io/milfctf.com/" +languageCode: en-us +title: My New Hugo Site +theme: PaperMod \ No newline at end of file