From 72ce58034e541b3441199fdb97e0281fc0334341 Mon Sep 17 00:00:00 2001 From: Matteo Bilotta Date: Wed, 24 Feb 2021 00:00:58 +0100 Subject: [PATCH] [FIX] Removed unused extra environments. --- .github/workflows/deploy-staging.yml | 101 ------------------ .../{deploy-production.yml => deploy.yml} | 5 +- README.md | 3 - 3 files changed, 1 insertion(+), 108 deletions(-) delete mode 100644 .github/workflows/deploy-staging.yml rename .github/workflows/{deploy-production.yml => deploy.yml} (97%) diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml deleted file mode 100644 index 831fe2e..0000000 --- a/.github/workflows/deploy-staging.yml +++ /dev/null @@ -1,101 +0,0 @@ -name: Deploy to Staging -on: - push: - branches: - - staging - -jobs: - build: - name: Build process - runs-on: ubuntu-latest - steps: - - name: Clone repository - uses: actions/checkout@v2 - - name: Install Node.js 15 - uses: actions/setup-node@v1 - with: - node-version: 15 - - - name: Install Yarn - run: npm install -g yarn - - name: Install dependencies - run: yarn ci - - name: Lint project - run: yarn lint:prod - # - name: Run tests - # run: yarn test - # - name: Build server files - # run: yarn build - - name: Generate static files - run: yarn generate - - name: Create artifact - run: | - PACKAGE_VERSION=`node -e "console.log(require('./package.json').version);"` - PACKAGE_NAME="byloth-website-v${PACKAGE_VERSION}.tgz" - yarn pack - tar -xzvf "${PACKAGE_NAME}" -C "." - - name: Upload artifact - uses: actions/upload-artifact@v2 - with: - name: byloth-website - path: package/dist - - # - # test: - # name: Test process - # needs: build - # runs-on: ubuntu-latest - # steps: - # - [...] - # - - deploy: - name: Deploy process - needs: build - runs-on: ubuntu-latest - environment: - name: staging - - steps: - - name: Install CurlFtpFS - run: sudo apt install curlftpfs - - name: Mount remote FTP directory - shell: bash - run: | - sudo mkdir -p "${VOLUME}" - sudo chown $(id -u):$(id -g) "${VOLUME}" - curlftpfs "${FTP_HOST}" "${VOLUME}" -o "user=${FTP_USER}:${FTP_PASS}" - - env: - VOLUME: /mnt/byloth-website - FTP_HOST: ${{ secrets.FTP_HOST }} - FTP_USER: ${{ secrets.FTP_USER }} - FTP_PASS: ${{ secrets.FTP_PASS }} - - - name: Download artifact - uses: actions/download-artifact@v2 - with: - name: byloth-website - path: dist - - - name: Compose `env.php` file - shell: bash - run: | - echo " "${ENV_FILE}" - echo "define('__RECIPIENT__', '${EMAIL_RECIPIENT}');" >> "${ENV_FILE}" - echo "define('__SENDER__', '${EMAIL_SENDER}');" >> "${ENV_FILE}" - - env: - ENV_FILE: dist/api/env.php - EMAIL_RECIPIENT: ${{ secrets.EMAIL_RECIPIENT }} - EMAIL_SENDER: ${{ secrets.EMAIL_SENDER }} - - - name: Replace directory content - shell: bash - run: | - shopt -s dotglob - rm -rfv "${VOLUME}/*" - cp -rfv dist/* "${VOLUME}/" - - env: - VOLUME: /mnt/byloth-website diff --git a/.github/workflows/deploy-production.yml b/.github/workflows/deploy.yml similarity index 97% rename from .github/workflows/deploy-production.yml rename to .github/workflows/deploy.yml index ab10d8c..50fe4dc 100644 --- a/.github/workflows/deploy-production.yml +++ b/.github/workflows/deploy.yml @@ -1,4 +1,4 @@ -name: Deploy to Production +name: Deploy on: push: branches: @@ -53,9 +53,6 @@ jobs: name: Deploy process needs: build runs-on: ubuntu-latest - environment: - name: production - steps: - name: Install CurlFtpFS run: sudo apt install curlftpfs diff --git a/README.md b/README.md index f4b064e..27ca917 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,5 @@ # Byloth's Website 🌐 # -[![Deploy to Staging](https://github.com/Byloth/website/actions/workflows/deploy-staging.yml/badge.svg)](https://github.com/Byloth/website/actions/workflows/deploy-staging.yml) -[![Deploy to Production](https://github.com/Byloth/website/actions/workflows/deploy-production.yml/badge.svg)](https://github.com/Byloth/website/actions/workflows/deploy-production.yml) - ### My personal website as a Nuxt.js application, written in TypeScript and based on Material Design. ### Actually, yet another attempt to develop my personal website, to be precise...