From 5d4d1796790b8e07e947ddf1c017fd2fd2a91ddf Mon Sep 17 00:00:00 2001 From: iiTzArcur Date: Thu, 30 Nov 2023 15:03:31 +0100 Subject: [PATCH 1/3] Create gh-pages.yml --- .github/workflows/gh-pages.yml | 52 ++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/gh-pages.yml diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..55b82ef --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,52 @@ +# Sample workflow for building and deploying a Jekyll site to GitHub Pages +name: Deploy Jekyll with GitHub Pages dependencies preinstalled + +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 +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 + +jobs: + # Build job + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Compress Images + id: calibre + uses: calibreapp/image-actions@main + with: + githubToken: ${{ secrets.GITHUB_TOKEN }} + compressOnly: true + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 From 65df7e5238b77815ebe46edf2c474ee059af472e Mon Sep 17 00:00:00 2001 From: iiTzArcur Date: Thu, 30 Nov 2023 15:07:41 +0100 Subject: [PATCH 2/3] Update gh-pages.yml --- .github/workflows/gh-pages.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 55b82ef..f1a4552 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -38,6 +38,9 @@ jobs: compressOnly: true - name: Upload artifact uses: actions/upload-pages-artifact@v2 + with: + # Upload entire repository + path: '.' # Deployment job deploy: From 13b70aa68e7e1c408678cc6775adfd7fd059a397 Mon Sep 17 00:00:00 2001 From: iiTzArcur Date: Thu, 30 Nov 2023 15:10:47 +0100 Subject: [PATCH 3/3] Delete .github/workflows/main.yml --- .github/workflows/main.yml | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index e64535e..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Compress images on demand (workflow_dispatch), and at 11pm every Sunday (schedule). -# Open a Pull Request if any images can be compressed. -name: Compress Images -on: - workflow_dispatch: - schedule: - - cron: '00 23 * * 0' -jobs: - build: - name: calibreapp/image-actions - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v3 - - name: Compress Images - id: calibre - uses: calibreapp/image-actions@main - with: - githubToken: ${{ secrets.GITHUB_TOKEN }} - compressOnly: true - - name: Create New Pull Request If Needed - if: steps.calibre.outputs.markdown != '' - uses: peter-evans/create-pull-request@v4 - with: - title: Compressed Images Nightly - branch-suffix: timestamp - commit-message: Compressed Images - body: ${{ steps.calibre.outputs.markdown }}