From de9e5a104cbb57df39c029fd4f71685bf8570ebc Mon Sep 17 00:00:00 2001 From: Amit Upadhyay Date: Tue, 12 Nov 2024 20:17:03 +0530 Subject: [PATCH] cleaned-up github actions --- .github/cue.sh | 8 --- .../{release.yml => create-release.yml} | 0 .github/workflows/cue.yml | 18 ----- .github/workflows/deploy-fastn-com.yml | 3 + .github/workflows/deploy.yml | 71 ------------------- ...{optimize-imgs.yml => optimize-images.yml} | 2 +- .../{test.yml => tests-and-formatting.yml} | 2 +- 7 files changed, 5 insertions(+), 99 deletions(-) delete mode 100644 .github/cue.sh rename .github/workflows/{release.yml => create-release.yml} (100%) delete mode 100644 .github/workflows/cue.yml delete mode 100644 .github/workflows/deploy.yml rename .github/workflows/{optimize-imgs.yml => optimize-images.yml} (97%) rename .github/workflows/{test.yml => tests-and-formatting.yml} (99%) diff --git a/.github/cue.sh b/.github/cue.sh deleted file mode 100644 index 4069cfa0fc..0000000000 --- a/.github/cue.sh +++ /dev/null @@ -1,8 +0,0 @@ -ls -pwd -cargo build --release -ls target -ls target/release -git clone https://github.com/fastn-stack/fastn.com.git -cd fastn.com -../target/release/fastn build diff --git a/.github/workflows/release.yml b/.github/workflows/create-release.yml similarity index 100% rename from .github/workflows/release.yml rename to .github/workflows/create-release.yml diff --git a/.github/workflows/cue.yml b/.github/workflows/cue.yml deleted file mode 100644 index 37dd05e32a..0000000000 --- a/.github/workflows/cue.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Cue Checks - -on: - workflow_dispatch: -jobs: - everything: - name: Rust Checks - runs-on: ubuntu-latest - steps: - - name: Check out - uses: actions/checkout@v4 - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - override: true - - name: Run cue test - run: bash .github/cue.sh diff --git a/.github/workflows/deploy-fastn-com.yml b/.github/workflows/deploy-fastn-com.yml index e1b0aa3b43..03339c41e2 100644 --- a/.github/workflows/deploy-fastn-com.yml +++ b/.github/workflows/deploy-fastn-com.yml @@ -4,6 +4,9 @@ on: workflow_dispatch: push: branches: [ main ] + paths: + - 'fastn.com/**' + - '.github/workflows/deploy-fastn-com.yml' jobs: env: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 9c767bad35..0000000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: Deploy Site - -on: - push: - branches: [ main ] - paths: - - '**.ftd' - workflow_dispatch: -env: - CARGO_TERM_COLOR: always - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout main branch - uses: actions/checkout@v4 - - uses: FranzDiebold/github-env-vars-action@v2 - - name: Running examples - id: run_examples - continue-on-error: false - uses: actions-rs/cargo@v1 - with: - command: run - args: --bin ftd - - uses: actions/upload-artifact@master - with: - name: TLD_BUILD - path: docs/ - - name: build for tld - id: build_tld - run: | - rm -rf docs/ - publish-tld: - runs-on: ubuntu-latest - needs: build - steps: - - name: Prepare `build` branch creation - id: clone_main - uses: actions/checkout@v4 - - name: Check if `build` branch exists - id: branch_exists - continue-on-error: true - run: /usr/bin/git ls-remote --heads origin build | grep "" - - name: Create branch if not exists - id: create_branch - if: steps.branch_exists.outcome != 'success' - run: | - git config --global user.email "actions-user@users.noreply.github.com" - git config --global user.name "actions-user" - git checkout --orphan build - git reset --hard - git commit --allow-empty -m "Initializing build branch" - git push origin build - - name: Checkout build branch - uses: actions/checkout@v4 - if: steps.branch_exists.outcome == 'success' - with: - ref: build - - run: /bin/rm -rf * - - uses: actions/download-artifact@master - with: - name: TLD_BUILD - path: . - - uses: stefanzweifel/git-auto-commit-action@v4 - name: Commit changes to build branch - with: - commit_message: SSR build - branch: build - commit_options: '--no-verify --signoff' - repository: . diff --git a/.github/workflows/optimize-imgs.yml b/.github/workflows/optimize-images.yml similarity index 97% rename from .github/workflows/optimize-imgs.yml rename to .github/workflows/optimize-images.yml index a929ee4689..71658f660d 100644 --- a/.github/workflows/optimize-imgs.yml +++ b/.github/workflows/optimize-images.yml @@ -1,5 +1,5 @@ # https://github.com/calibreapp/image-actions -name: Compress Images +name: Optimize Images on: push: branches: diff --git a/.github/workflows/test.yml b/.github/workflows/tests-and-formatting.yml similarity index 99% rename from .github/workflows/test.yml rename to .github/workflows/tests-and-formatting.yml index 5859e53da4..20a21acecb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/tests-and-formatting.yml @@ -7,7 +7,7 @@ on: pull_request: branches: [ main ] jobs: - everything: + tests-and-formatting: name: Rust/JS Checks/Formatting runs-on: ubuntu-latest env: