name: documentation on: pull_request: branches: [develop] types: [review_requested, ready_for_review] paths: - 'website/**' push: branches: [main] paths: - 'website/**' workflow_dispatch: jobs: check-build: if: github.event_name != 'push' runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - uses: actions/setup-node@v1 with: node-version: '12.x' - name: Test Build run: | cd website if [ -e yarn.lock ]; then yarn install --frozen-lockfile elif [ -e package-lock.json ]; then npm ci else npm i fi npm run build deploy-website: if: github.event_name != 'pull_request' runs-on: ubuntu-latest steps: - name: 🚚 Get latest code uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: '12.x' - name: 🔨 Build run: | cd website if [ -e yarn.lock ]; then yarn install --frozen-lockfile elif [ -e package-lock.json ]; then npm ci else npm i fi npm run build - name: 📂 Sync files uses: SamKirkland/FTP-Deploy-Action@4.0.0 with: server: ftp.openpype.io username: ${{ secrets.ftp_user }} password: ${{ secrets.ftp_password }} local-dir: ./website/build/