Merge pull request #287 from ynput/252-add-documentation-for-webactions #554
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: π Test and deploy documentation | |
on: | |
pull_request: | |
branches: [main] | |
types: [review_requested, ready_for_review] | |
paths: | |
- 'website/**' | |
push: | |
branches: [main] | |
paths: | |
- 'website/**' | |
workflow_dispatch: | |
jobs: | |
test-build: | |
if: github.event_name != 'push' | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: 'website' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: yarn | |
cache-dependency-path: './website/yarn.lock' | |
- name: Install dependencies | |
run: yarn install | |
- name: π¨ Test build website | |
run: yarn build | |
deploy-website: | |
if: github.event_name != 'pull_request' | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: 'website' | |
steps: | |
- name: π Get latest code | |
uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: yarn | |
cache-dependency-path: './website/yarn.lock' | |
- name: Install dependencies | |
run: yarn install | |
- name: π¨ Build | |
run: yarn run build | |
- name: π Sync files | |
uses: SamKirkland/[email protected] | |
with: | |
server: ftp.openpype.io | |
username: ${{ secrets.ftp_user }} | |
password: ${{ secrets.ftp_password }} | |
protocol: ftps | |
local-dir: ./website/build/ |