From df909e40731c25bd40dc54ea003270366293b954 Mon Sep 17 00:00:00 2001 From: Sujit Kumar <60378235+therealsujitk@users.noreply.github.com> Date: Sat, 4 May 2024 12:50:53 +0530 Subject: [PATCH 1/2] chore: add workflow step to deploy to github pages --- .github/workflows/docker-image.yml | 18 ------------- .github/workflows/website-ci.yml | 41 ++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 18 deletions(-) delete mode 100644 .github/workflows/docker-image.yml create mode 100644 .github/workflows/website-ci.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml deleted file mode 100644 index d4f37f3..0000000 --- a/.github/workflows/docker-image.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Website CI - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Build the website - run: docker-compose run --rm middleman bundle exec middleman build diff --git a/.github/workflows/website-ci.yml b/.github/workflows/website-ci.yml new file mode 100644 index 0000000..6888c9f --- /dev/null +++ b/.github/workflows/website-ci.yml @@ -0,0 +1,41 @@ +name: Website CI + +on: + push: + branches: main + pull_request: + branches: main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Build the website + run: docker-compose run --rm middleman bundle exec middleman build + + - name: Upload the build artifact + if: github.event_name == 'push' + uses: actions/upload-pages-artifact@v3 + with: + path: "./build" + + deploy: + if: github.event_name == 'push' + needs: build + + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest + + steps: + - name: Deploy to GitHub Pages + uses: actions/deploy-pages@v4 From 0d2b311295c23c52dae74e6bc2568716d11f2cf2 Mon Sep 17 00:00:00 2001 From: Sujit Kumar <60378235+therealsujitk@users.noreply.github.com> Date: Sun, 5 May 2024 08:01:42 +0530 Subject: [PATCH 2/2] chore: display deployment url in workflow --- .github/workflows/website-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/website-ci.yml b/.github/workflows/website-ci.yml index 6888c9f..a98a050 100644 --- a/.github/workflows/website-ci.yml +++ b/.github/workflows/website-ci.yml @@ -38,4 +38,5 @@ jobs: steps: - name: Deploy to GitHub Pages + id: deployment # required to display the deployment url in the workflow uses: actions/deploy-pages@v4