From 325da70b34f03b9a63920f8123e22d26487e1ae5 Mon Sep 17 00:00:00 2001 From: Quinn Ouyang <90884224+quinnouyang@users.noreply.github.com> Date: Mon, 18 Mar 2024 01:38:13 -0500 Subject: [PATCH] Create main.yml for CPanel deployment --- .github/workflows/main.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..0dd3ecf --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,29 @@ +on: push +name: 🚀 Deploy website on push +jobs: + web-deploy: + name: 🎉 Deploy + runs-on: ubuntu-latest + steps: + - name: 🚚 Get latest code + uses: actions/checkout@v4 + + - name: Use Node.js 20 + uses: actions/setup-node@v2 + with: + node-version: 20 + + - name: 🔨 Build Project + run: | + npm install + npm install -g vite + npm run all && tsc && vite build --base https://stephenandrewtaylor.net/rare-test/ --outDir rare-test + + - name: 📂 Sync files + uses: SamKirkland/FTP-Deploy-Action@v4.3.5 + with: + server: ftp.stephenandrewtaylor.net + username: quinnouyang@stephenandrewtaylor.net + password: ${{ secrets.ftp_password }} + local-dir: ./rare-test/ + dry-run: true