From e391dcaf361f4076f4c9ad8f57e553da7b9e5723 Mon Sep 17 00:00:00 2001 From: Emilia Date: Wed, 6 Jul 2022 16:56:06 -0400 Subject: [PATCH] Add fast deployment action Action is a duplicate of the normal action but not concurrent and should be faster. --- .github/workflows/fast-deploy.yaml | 48 ++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/fast-deploy.yaml diff --git a/.github/workflows/fast-deploy.yaml b/.github/workflows/fast-deploy.yaml new file mode 100644 index 0000000..ce72929 --- /dev/null +++ b/.github/workflows/fast-deploy.yaml @@ -0,0 +1,48 @@ +name: fastCI +on: + workflow_dispatch: +jobs: + fast-deploy: + runs-on: ubuntu-latest + steps: + - name: Pull most recent version of repo + uses: appleboy/ssh-action@master + with: + host: ilia.moe + username: ubuntu + key: ${{ secrets.SSH_KEY }} + script: | + cd repo + git stash + git pull --force origin master + git submodule update --remote + - name: Recompile sass for the main website + uses: appleboy/ssh-action@master + with: + host: ilia.moe + username: ubuntu + key: ${{ secrets.SSH_KEY }} + script: | + cd repo/src + sass sass/:css/ + - name: Build hugo + uses: appleboy/ssh-action@master + with: + host: ilia.moe + username: ubuntu + key: ${{ secrets.SSH_KEY }} + script: | + cd repo/hugo + cd recipe + hugo -D + - name: Move files so NGINX can see them + uses: appleboy/ssh-action@master + with: + host: ilia.moe + username: ubuntu + key: ${{ secrets.SSH_KEY }} + script: | + sudo su + rm -rf /usr/share/nginx/html/ilia.moe + cp -r repo/src /usr/share/nginx/html/ilia.moe + cp -r repo/hugo/recipe/public /usr/share/nginx/html/ilia.moe/cool-stuff/recipes