From d86457b88b2273bb89771dc96eaaf8dae5e7fab9 Mon Sep 17 00:00:00 2001 From: Ben Meier Date: Wed, 10 Jul 2024 13:27:30 +0100 Subject: [PATCH] chore: adjust ci files Signed-off-by: Ben Meier --- .github/workflows/hugo.yml | 31 ++++--------------------- .github/workflows/pull-request.yml | 4 ++++ .github/workflows/release-to-dev.yml | 33 --------------------------- .github/workflows/release-to-prod.yml | 32 -------------------------- 4 files changed, 8 insertions(+), 92 deletions(-) delete mode 100644 .github/workflows/release-to-dev.yml delete mode 100644 .github/workflows/release-to-prod.yml diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml index 27263b6b..74bc89ba 100644 --- a/.github/workflows/hugo.yml +++ b/.github/workflows/hugo.yml @@ -1,42 +1,24 @@ -# Sample workflow for building and deploying a Hugo site to GitHub Pages name: Deploy Hugo site to Pages - on: - # Runs on pushes targeting the default branch push: branches: ["main"] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages + paths-ignore: + - README.md + - CONTRIBUTING.md + - CODE_OF_CONDUCT.md permissions: contents: read pages: write id-token: write - -# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. concurrency: group: "pages" cancel-in-progress: false - -# Default to bash -defaults: - run: - shell: bash - jobs: - # Build job build: runs-on: ubuntu-latest - env: - HUGO_VERSION: 0.128.0 steps: - name: Checkout uses: actions/checkout@v4 - with: - submodules: recursive - name: Set Node.js 20 uses: actions/setup-node@v4 with: @@ -51,9 +33,6 @@ jobs: id: pages uses: actions/configure-pages@v5 - name: Build with Hugo - env: - HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache - HUGO_ENVIRONMENT: production run: | yarn run hugo \ --minify \ @@ -62,8 +41,6 @@ jobs: uses: actions/upload-pages-artifact@v3 with: path: ./public - - # Deployment job deploy: environment: name: github-pages diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index e204d36f..f8b87a43 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -5,6 +5,8 @@ on: branches: [ "*" ] paths-ignore: - README.md + - CONTRIBUTING.md + - CODE_OF_CONDUCT.md jobs: test: @@ -12,6 +14,8 @@ jobs: steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v4 + with: + node-version: 20 - run: npm install -g yarn - run: yarn install - run: yarn run hugo diff --git a/.github/workflows/release-to-dev.yml b/.github/workflows/release-to-dev.yml deleted file mode 100644 index 292986f5..00000000 --- a/.github/workflows/release-to-dev.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Release to Dev Environment - -on: - push: - branches: [main] - -jobs: - build-and-push: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Build and Push to Humanitec - Github Tag - uses: humanitec/build-push-to-humanitec@v1 - with: - humanitec-token: ${{ secrets.HUMANITEC_TOKEN_HUMANITEC_LABS }} - organization: humanitec-labs - file: Dockerfile - image-name: score-docs - auto-tag: true - - docs-build-and-push: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Build and Push to Humanitec - Github Tag - uses: humanitec/build-push-to-humanitec@v1 - with: - humanitec-token: ${{ secrets.HUMANITEC_TOKEN }} - organization: documentation - file: Dockerfile - image-name: score-docs - auto-tag: true diff --git a/.github/workflows/release-to-prod.yml b/.github/workflows/release-to-prod.yml deleted file mode 100644 index 62f7620f..00000000 --- a/.github/workflows/release-to-prod.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Release to Production Environment - -on: - release: - types: [released] - -jobs: - build-and-push: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Build and Push to Humanitec - Github Tag - uses: humanitec/build-push-to-humanitec@v1 - with: - humanitec-token: ${{ secrets.HUMANITEC_TOKEN_HUMANITEC_LABS }} - organization: humanitec-labs - file: Dockerfile - image-name: score-docs - auto-tag: true - - docs-build-and-push: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Build and Push to Humanitec - Github Tag - uses: humanitec/build-push-to-humanitec@v1 - with: - humanitec-token: ${{ secrets.HUMANITEC_TOKEN }} - organization: documentation - file: Dockerfile - image-name: score-docs - auto-tag: true