From 99d06f7a520a940688fbcbbd1e49f03e5cbd2ed9 Mon Sep 17 00:00:00 2001 From: Harsh Singh <64768386+harshdoesdev@users.noreply.github.com> Date: Thu, 25 Jan 2024 12:08:08 +0530 Subject: [PATCH] Update deploy.yml --- .github/workflows/deploy.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 524cd6f..16712f0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,9 +3,9 @@ name: Deploy Site on: push: branches: [ main ] - paths: - - '**.ftd' - - '**.md' + # paths: + # - '**.ftd' + # - '**.md' workflow_dispatch: workflow_call: env: @@ -13,7 +13,6 @@ env: jobs: build: - permissions: write-all runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -21,15 +20,20 @@ jobs: - name: Install fastn id: install_fastn continue-on-error: false - run: sh -c "$(curl -fsSL https://raw.githubusercontent.com/fastn-stack/fastn/main/install.sh)" + 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 id: build continue-on-error: false run: | echo "Using '$CI_REPOSITORY_NAME_SLUG/' as the base while building" - fastn build --base=/$CI_REPOSITORY_NAME/ - - name: copy CNAME - run: '(test -f CNAME && cp CNAME .build) || echo "CNAME does not exist, skipping step"' + fastn build --base=/$CI_REPOSITORY_NAME/ --zip-url=${{ steps.get_zip_url.outputs.zip_url }} - name: Deploy uses: peaceiris/actions-gh-pages@v3 if: ${{ github.ref == 'refs/heads/main' }}