From 31e217866dbd83dc6dacaa81bc81294526bf6981 Mon Sep 17 00:00:00 2001 From: sookim-1 Date: Tue, 9 Jul 2024 13:54:31 +0900 Subject: [PATCH] =?UTF-8?q?[Refactor]=20:=20ci.yml=20=EA=B3=BC=20deploy.ym?= =?UTF-8?q?l=20=ED=86=B5=ED=95=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{deploy.yml => build-and-deploy.yml} | 34 ++++++++---------- .github/workflows/ci.yml | 36 ------------------- 2 files changed, 14 insertions(+), 56 deletions(-) rename .github/workflows/{deploy.yml => build-and-deploy.yml} (71%) delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/build-and-deploy.yml similarity index 71% rename from .github/workflows/deploy.yml rename to .github/workflows/build-and-deploy.yml index 1f9c22c..d358d9a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -1,38 +1,32 @@ -name: Deploy +name: Build and Deploy + +on: + push: + branches: [ main ] -on: - workflow_run: - workflows: ["ci"] - types: - - completed - permissions: contents: read jobs: - build: + build-and-deploy: runs-on: ubuntu-20.04 container: image: swift:5.6-focal steps: - uses: actions/checkout@v3 + - name: Install Dependencies + run: | + apt-get update + apt-get install -y make + fallocate -l 2G /swapfile + chmod 600 /swapfile + mkswap /swapfile + swapon /swapfile - name: Build run: | swift --version swift package --version swift build -v - deploy-github-pages: - runs-on: ubuntu-20.04 - container: - image: swift:5.6-focal - options: --memory 2g - needs: build - steps: - - uses: actions/checkout@v3 - - name: Install Dependencies - run: | - apt-get update - apt-get install -y make - name: Setup run: make setup - name: Generate the website diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 856ff2d..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: CI - -on: - push: - branches: [ main ] - -permissions: - contents: read - -jobs: - build: - runs-on: ubuntu-20.04 - container: - image: swift:5.6-focal - steps: - - uses: actions/checkout@v3 - - name: Build - run: | - swift --version - swift package --version - swift build -v - - generate-website: - runs-on: ubuntu-20.04 - container: - image: swift:5.6-focal - steps: - - uses: actions/checkout@v3 - - name: Install Dependencies - run: | - apt-get update - apt-get install -y make - - name: Setup - run: make setup - - name: Generate the website - run: make generate