diff --git a/.github/workflows/deploy-test.yml b/.github/workflows/deploy-test.yml new file mode 100644 index 00000000..f0161ab4 --- /dev/null +++ b/.github/workflows/deploy-test.yml @@ -0,0 +1,33 @@ +name: Deploy https://d2.pub + +on: + push: + branches: + - master + +env: + REPO: ${{ GITHUB_REPOSITORY//*\// }} + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: '10.x' + - name: Build + run: | + npm install + npm run build:preview + - name: Deploy + uses: SamKirkland/FTP-Deploy-Action@2.0.0 + env: + FTP_SERVER: ${{ secrets.FTP_SERVER }} + FTP_USERNAME: ${{ secrets.FTP_USERNAME }} + FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }} + METHOD: sftp + PORT: ${{ secrets.FTP_PORT }} + LOCAL_DIR: dist + REMOTE_DIR: /www/d2-admin/preview + ARGS: --delete --verbose --parallel=100 \ No newline at end of file