From cea66409ba3e09f7c71921e30cd0db2f9483bb28 Mon Sep 17 00:00:00 2001 From: Olivier Demers Date: Sun, 14 Jul 2024 15:35:46 -0400 Subject: [PATCH] add action --- gitea/workflows/deploy.yaml | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 gitea/workflows/deploy.yaml diff --git a/gitea/workflows/deploy.yaml b/gitea/workflows/deploy.yaml new file mode 100644 index 0000000..be2a184 --- /dev/null +++ b/gitea/workflows/deploy.yaml @@ -0,0 +1,44 @@ +name: Deploy website +run-name: ${{ gitea.actor }} déploie 🚀 +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - name: Install dependencies + run: npm install + + - name: build + run: npm run build + + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: build + path: 'build/' + overwrite: true + + deploy: + runs-on: ubuntu-latest + needs: build + environment: + name: pls5618.com + url: https://pls5618.com + steps: + - name: deploy + uses: SamKirkland/FTP-Deploy-Action@v4.3.5 + with: + server: pls5618.com + username: ${{ secrets.ftp_user }} + password: ${{ secrets.ftp_password }} + \ No newline at end of file