diff options
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/auto-merge.yml | 41 | ||||
-rw-r--r-- | .github/workflows/ci.yml | 48 | ||||
-rw-r--r-- | .github/workflows/gh-pages.yml | 32 |
3 files changed, 32 insertions, 89 deletions
diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml deleted file mode 100644 index d051de7..0000000 --- a/.github/workflows/auto-merge.yml +++ /dev/null @@ -1,41 +0,0 @@ -# see https://gist.github.com/xt0rted/46475099dc0a70ba63e16e3177407872 - -name: Dependabot auto-merge - -on: - pull_request: - branches: - - master - -permissions: - contents: read - pull-requests: read - -jobs: - auto-merge: - runs-on: ubuntu-latest - - if: github.actor == 'dependabot[bot]' - - steps: - - name: Create token - id: create_token - uses: tibdex/github-app-token@v2 - with: - app_id: ${{ secrets.BIG_MERGER_APP_ID }} - private_key: ${{ secrets.BIG_MERGER_PRIVATE_KEY }} - - - name: Dependabot metadata - id: dependabot-metadata - uses: dependabot/fetch-metadata@v1 - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" - - - name: Authenticate cli - run: echo "${{ steps.create_token.outputs.token }}" | gh auth login --with-token - - - name: Enable auto-merge for Dependabot PRs - if: contains(fromJSON('["version-update:semver-patch", "version-update:semver-minor"]'), steps.dependabot-metadata.outputs.update-type) - run: gh pr merge --auto --squash "$PR_URL" - env: - PR_URL: ${{github.event.pull_request.html_url}} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 581a78f..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: CI - -on: - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - build: - name: Build - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Hugo - uses: peaceiris/actions-hugo@v2.6.0 - with: - hugo-version: latest - - - name: Build local ./exampleSite - run: hugo --minify --gc --destination ../public --source ./exampleSite --themesDir ../.. --baseURL https://janraasch.github.io/hugo-bearblog/ - - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: build - path: ./public - - deploy: - needs: build - name: Deploy to GitHub Pages - runs-on: ubuntu-latest - if: github.event_name == 'push' - steps: - - uses: actions/checkout@v4 - - uses: actions/download-artifact@v4 - with: - name: build - path: ./public - - uses: peaceiris/actions-gh-pages@v3.9.2 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./public diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..f7f133d --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,32 @@ +name: github pages + +on: + push: + branches: + - main # Set a branch that will trigger a deployment + pull_request: + +jobs: + deploy: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + 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 --gc --destination ../public --source ./exampleSite --themesDir ../.. --baseURL https://clente.github.io/hugo-bearcub/ + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/main' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./public |