diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index b97a6e5..c7b4021 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -1,29 +1,28 @@ -name: Node.js CI - -on: [push] - +on: push +name: 🚀 Deploy website on push jobs: - build: + web-deploy: + name: 🎉 Deploy runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [12.x] - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - run: npm install - - run: npm run build --if-present - - name: FTP Deploy - uses: SamKirkland/FTP-Deploy-Action@3.0.0 - with: - ftp-server: ${{ secrets.ftp_server }} - ftp-username: ${{ secrets.ftp_user }} - ftp-password: ${{ secrets.ftp_pwd }} - local-dir: build/ - env: - CI: true \ No newline at end of file + - name: 🚚 Get latest code + uses: actions/checkout@v2.3.2 + + - name: Use Node.js 12 + uses: actions/setup-node@v2-beta + with: + node-version: '12' + + - name: 🔨 Build Project + run: | + npm install + npm run build + + - name: 📂 Sync files + uses: SamKirkland/FTP-Deploy-Action@4.0.0 + with: + server: ${{ secrets.ftp_server }} + username: ${{ secrets.ftp_user }} + password: ${{ secrets.ftp_pwd }} + local-dir: ./build/ + server-dir: code-docs/www/