From 32782956141e8a9299f475acd42716f54f96d353 Mon Sep 17 00:00:00 2001 From: Ganesh Salunke <68585007+gsalunke@users.noreply.github.com> Date: Fri, 8 Sep 2023 12:28:27 +0530 Subject: [PATCH] Update deploy.yml Signed-off-by: Ganesh Salunke <68585007+gsalunke@users.noreply.github.com> --- .github/workflows/deploy.yml | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 524cd6f..ed64008 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,13 +3,8 @@ name: Deploy Site on: push: branches: [ main ] - paths: - - '**.ftd' - - '**.md' workflow_dispatch: - workflow_call: -env: - CARGO_TERM_COLOR: always + workflow_call: jobs: build: @@ -18,21 +13,18 @@ jobs: steps: - uses: actions/checkout@v2 - uses: FranzDiebold/github-env-vars-action@v2 - - 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: Build the pages with fastn - id: build - continue-on-error: false 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/ - - name: copy CNAME + # 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=/ + - name: copy CNAME if found run: '(test -f CNAME && cp CNAME .build) || echo "CNAME does not exist, skipping step"' - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - if: ${{ github.ref == 'refs/heads/main' }} + - uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./.build