From 7ce9e16cd80d05a6de83a6121fb9a9837eec056e Mon Sep 17 00:00:00 2001 From: Harsh Singh Date: Mon, 9 Oct 2023 14:16:35 +0530 Subject: [PATCH 1/3] Updated deploy workflow to enable 0.4 and incremental build --- .github/workflows/deploy.yml | 41 ++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ed64008..04945b7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,10 +1,10 @@ -name: Deploy Site +name: Deploy HackTree Pages on: - push: - branches: [ main ] - workflow_dispatch: - workflow_call: + push: + branches: [ main ] + workflow_dispatch: + workflow_call: jobs: build: @@ -13,18 +13,45 @@ jobs: steps: - uses: actions/checkout@v2 - uses: FranzDiebold/github-env-vars-action@v2 + - name: Download the cached .build + uses: actions/cache@v2 + with: + path: ./.build + key: build-artifact + - name: Check and Restore Cache for fastn.com Directory + uses: actions/cache@v2 + with: + path: ~/.cache/fastn.com + key: fastn-com-${{ hashFiles('./.build/**') }} + restore-keys: | + fastn-com- - run: sh -c "$(curl -fsSL https://fastn.com/install.sh)" - name: Build the pages with fastn run: | echo "Using '$CI_REPOSITORY_NAME_SLUG/' as the base while building" # To deploy the website using GitHub Pages, use the below command - fastn build --base=/$CI_REPOSITORY_NAME/ + fastn build --edition=2023 --base=/$CI_REPOSITORY_NAME/ # To deploy the website using Custom Domain, use the below command and comment #out the above command when deploying through GitHub Pages - #fastn build --base=/ + # fastn build --edition=2023 --base=/ - name: copy CNAME if found run: '(test -f CNAME && cp CNAME .build) || echo "CNAME does not exist, skipping step"' - uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./.build + - name: Cache .build Directory + uses: actions/cache@v2 + with: + key: build-artifact + restore-keys: | + build-artifact + path: ./.build + - name: Save fastn.com to Cache + uses: actions/cache@v2 + with: + path: | + ~/.cache/fastn.com + key: fastn-com- + restore-keys: | + fastn-com- From d1040d7fd3994ac9a4f1bf2b85932d193a61d115 Mon Sep 17 00:00:00 2001 From: Harsh Singh Date: Mon, 9 Oct 2023 14:51:14 +0530 Subject: [PATCH 2/3] fixed typo --- .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 04945b7..242016b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,4 +1,4 @@ -name: Deploy HackTree Pages +name: Deploy Site on: push: From d8d77c86e42b79207424fb54e98e1fab006421c6 Mon Sep 17 00:00:00 2001 From: Harsh Singh Date: Mon, 9 Oct 2023 14:51:56 +0530 Subject: [PATCH 3/3] formatting --- .github/workflows/deploy.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 242016b..ca24325 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,10 +1,10 @@ name: Deploy Site on: - push: - branches: [ main ] - workflow_dispatch: - workflow_call: + push: + branches: [ main ] + workflow_dispatch: + workflow_call: jobs: build: