Skip to content

Merge pull request #1509 from plone/gforcada-patch-2 #316

Merge pull request #1509 from plone/gforcada-patch-2

Merge pull request #1509 from plone/gforcada-patch-2 #316

Workflow file for this run

name: Build and deploy Plone 6 documentation to 6.docs.plone.org
on:
push:
branches:
- "6-dev"
- "6.0"
jobs:
build_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Install dependencies
run: |
pip install -q -r requirements-initial.txt
pip install -q -r requirements.txt
pip freeze
# - name: Run Vale
# run: make vale
# - name: Run linkcheck
# run: make linkcheck
- name: Prepare deploy
run: make deploy
# node setup
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install Yarn
run: npm install -g yarn
# node cache
- name: Get yarn cache directory path
id: yarn-cache-dir-path
working-directory: submodules/volto
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: StoryBook build
run: |
cd submodules/volto
yarn install --immutable
yarn build-storybook -o ../../_build/html/storybook
- name: Deploy to server
id: deploy
uses: Pendect/[email protected]
env:
DEPLOY_KEY: ${{secrets.DEPLOY_KEY_DOCS}}
with:
flags: '-avzr --delete'
options: ''
ssh_options: '-p ${{secrets.DEPLOY_PORT}}'
src: '_build/html/'
dest: '${{secrets.DEPLOY_USER_DOCS}}@${{secrets.DEPLOY_SERVER_DOCS}}:${{secrets.DEPLOY_PATH_DOCS}}'
- name: Display status from deploy
run: echo "${{ steps.deploy.outputs.status }}"