diff options
-rw-r--r-- | .github/workflows/main.yml | 35 | ||||
-rw-r--r-- | exampleSite/config.toml | 3 |
2 files changed, 37 insertions, 1 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..24cc9e6 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,35 @@ +name: github pages + +on: + push: + branches: + - master # Set a branch to deploy + +jobs: + deploy: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./exampleSite + steps: + - uses: actions/checkout@v2 + with: + submodules: true # Fetch Hugo themes (true OR recursive) + fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: 'latest' + extended: true + + - name: Build + run: | + hugo --minify + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./exampleSite/public # if not specified it defaults to ./public. source directory of the built files to make the deploy (must match the build to directory in config.toml), eg ./docs, ./public, ./exampleSite/public + diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 61a6eb9..b249839 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -1,4 +1,4 @@ -baseurl = "https://example.org" +baseurl = "https://devcows.github.io/hugo-universal-theme/" # Configure URL. if using gh-pages https://github.com/<username>/hugo-universal-theme URL: https://<username>.github.io/hugo-universal-theme/ title = "Universal" theme = "hugo-universal-theme" themesDir = "../.." @@ -10,6 +10,7 @@ disqusShortname = "devcows" # Enable Google Analytics by entering your tracking code googleAnalytics = "" + # Define the number of posts per page paginate = 10 |