From fb5f13b47b5f996e6568c5ad2f64eb2190eca9ed Mon Sep 17 00:00:00 2001 From: Harsh Singh Date: Wed, 17 Jan 2024 11:23:36 +0530 Subject: [PATCH] Added .gitattributes file --- .gitattributes | 1 + .github/workflows/deploy.yml | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..b53ae7e --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +.packages/** linguist-vendored diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2f22565..d5aa7da 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -45,14 +45,21 @@ jobs: run: git pull - uses: FranzDiebold/github-env-vars-action@v2 - run: sh -c "$(curl -fsSL https://fastn.com/install.sh)" + - name: Get latest commit information + id: get_commit + run: echo "::set-output name=commit_sha::$(git rev-parse HEAD)" + - name: Get raw zipball URL + id: get_zip_url + run: | + echo "::set-output name=zip_url::https://github.com/${{ github.repository }}/archive/${{ steps.get_commit.outputs.commit_sha }}.zip" - 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 --edition=2023 --base=/$CI_REPOSITORY_NAME/ + fastn build --zip-url=${{ steps.get_zip_url.outputs.zip_url }} --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 --edition=2023 --base=/ + #fastn build --zip-url=${{ steps.get_zip_url.outputs.zip_url }} --base=/ - name: copy CNAME if found run: '(test -f CNAME && cp CNAME .build) || echo "CNAME does not exist, skipping step"' - name: Deploy to GitHub Pages