diff --git a/themes/bonsai/.github/dependabot.yml b/themes/bonsai/.github/dependabot.yml new file mode 100644 index 0000000..f63028d --- /dev/null +++ b/themes/bonsai/.github/dependabot.yml @@ -0,0 +1,11 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + day: monday + open-pull-requests-limit: 5 + commit-message: + prefix: chore + include: scope diff --git a/themes/bonsai/.github/workflows/build.yml b/themes/bonsai/.github/workflows/build.yml new file mode 100644 index 0000000..6eb5b8d --- /dev/null +++ b/themes/bonsai/.github/workflows/build.yml @@ -0,0 +1,40 @@ +name: build + +on: + pull_request: + branches: [main] + push: + branches: [main] + +permissions: + contents: read + +concurrency: + group: build-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + + - name: Setup Hugo Extended + uses: peaceiris/actions-hugo@v3 + with: + hugo-version: '0.154.0' + extended: true + + - name: Build exampleSite + working-directory: exampleSite + run: hugo --gc --minify --themesDir ../.. --printPathWarnings + + - name: Upload built site + uses: actions/upload-artifact@v4 + with: + name: exampleSite-public + path: exampleSite/public + retention-days: 7 diff --git a/themes/bonsai/.github/workflows/deploy.yml b/themes/bonsai/.github/workflows/deploy.yml new file mode 100644 index 0000000..6c88852 --- /dev/null +++ b/themes/bonsai/.github/workflows/deploy.yml @@ -0,0 +1,57 @@ +name: deploy + +on: + push: + branches: [main] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + + - id: pages + uses: actions/configure-pages@v5 + + - name: Setup Hugo Extended + uses: peaceiris/actions-hugo@v3 + with: + hugo-version: '0.154.0' + extended: true + + - name: Build with production baseURL + working-directory: exampleSite + run: | + hugo \ + --gc \ + --minify \ + --themesDir ../.. \ + --baseURL "${{ steps.pages.outputs.base_url }}/" + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: exampleSite/public + + deploy: + needs: build + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - id: deployment + uses: actions/deploy-pages@v4