From ab9d4b0d064b28279ab0de2ab37bdd874afc1dc5 Mon Sep 17 00:00:00 2001 From: Harsh Singh <64768386+harshdoesdev@users.noreply.github.com> Date: Sat, 27 Jan 2024 16:42:49 +0530 Subject: [PATCH 1/8] Update deploy.yml Signed-off-by: Harsh Singh <64768386+harshdoesdev@users.noreply.github.com> --- .github/workflows/deploy.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 87220b16b..9106fbf2b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,9 +7,20 @@ on: jobs: fastn-build: + permissions: write-all runs-on: ubuntu-latest steps: - - name: Install fastn - run: source <(curl -fsSL https://fastn.com/install.sh) + - name: Checkout code + uses: actions/checkout@v2 + - name: Pull the latest commits + run: git pull + - uses: FranzDiebold/github-env-vars-action@v2 + - run: sh -c "$(curl -fsSL https://fastn.com/install.sh)" - name: Build the pages with fastn - run: fastn build + run: fastn build --base=/ --offline + - name: Deploy to vh_page branch + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./.build + publish_branch: vh_page From e1bb853246b945ab520e364bf9c01c652b111b7d Mon Sep 17 00:00:00 2001 From: Harsh Singh Date: Sat, 27 Jan 2024 16:59:38 +0530 Subject: [PATCH 2/8] implemented recommended changes --- .github/workflows/deploy.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9106fbf2b..cbbf3d941 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,17 +7,14 @@ on: jobs: fastn-build: - permissions: write-all runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - - name: Pull the latest commits - run: git pull - - uses: FranzDiebold/github-env-vars-action@v2 - - run: sh -c "$(curl -fsSL https://fastn.com/install.sh)" - - name: Build the pages with fastn - run: fastn build --base=/ --offline + - name: Install Fastn + run: source <(curl -fsSL https://fastn.com/install.sh) + - name: Build pages with Fastn + run: fastn build --offline - name: Deploy to vh_page branch uses: peaceiris/actions-gh-pages@v3 with: From 69d3a5953a5443d90c72e2c1d7be84ad1a8809af Mon Sep 17 00:00:00 2001 From: Harsh Singh Date: Sat, 27 Jan 2024 17:31:11 +0530 Subject: [PATCH 3/8] run only fastn build for open prs --- .github/workflows/deploy.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cbbf3d941..cb47b431a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,7 +2,11 @@ name: fastn build to update vh_pages branch on: push: - branches: [ main ] + branches: + - main + pull_request: + branches: + - main workflow_dispatch: jobs: @@ -11,13 +15,15 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v2 - - name: Install Fastn + - name: Install fastn run: source <(curl -fsSL https://fastn.com/install.sh) - - name: Build pages with Fastn + - name: Build pages with fastn run: fastn build --offline - name: Deploy to vh_page branch + if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./.build publish_branch: vh_page + full_commit_message: ${{ github.event.pull_request.head.sha }} From a3cd609e733c1360ea936bb0a9a3f40d664df085 Mon Sep 17 00:00:00 2001 From: Harsh Singh Date: Sat, 27 Jan 2024 17:41:23 +0530 Subject: [PATCH 4/8] added force_orpahn param --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cb47b431a..8dddb25ac 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,4 +26,5 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./.build publish_branch: vh_page + force_orphan: true full_commit_message: ${{ github.event.pull_request.head.sha }} From 7101e056e007423e2de08bc6d418367467d81e47 Mon Sep 17 00:00:00 2001 From: Harsh Singh Date: Sat, 27 Jan 2024 17:47:02 +0530 Subject: [PATCH 5/8] set force_orphan to false --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8dddb25ac..5178ec89b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,5 +26,5 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./.build publish_branch: vh_page - force_orphan: true + force_orphan: false full_commit_message: ${{ github.event.pull_request.head.sha }} From 2a1391af9c82ef16ee84a83544a7dd6a1d30c4b0 Mon Sep 17 00:00:00 2001 From: Harsh Singh Date: Sat, 27 Jan 2024 17:56:16 +0530 Subject: [PATCH 6/8] added dependabot.yml --- .github/dependabot.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..b85502dab --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: +- package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + labels: + - "CI/CD" + commit-message: + prefix: ci From b1a07c71fb1fc8e636f9385313729f0fe71c324d Mon Sep 17 00:00:00 2001 From: Harsh Singh Date: Sat, 27 Jan 2024 18:00:33 +0530 Subject: [PATCH 7/8] updated checkout action version --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5178ec89b..6b5600a19 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install fastn run: source <(curl -fsSL https://fastn.com/install.sh) - name: Build pages with fastn From 83d220733b1a054baa32aaa09ee03439b60cad0c Mon Sep 17 00:00:00 2001 From: Harsh Singh Date: Sat, 27 Jan 2024 18:21:12 +0530 Subject: [PATCH 8/8] set dependabot schedule to daily --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b85502dab..58c14f333 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,7 +3,7 @@ updates: - package-ecosystem: "github-actions" directory: "/" schedule: - interval: "weekly" + interval: "daily" labels: - "CI/CD" commit-message: