Merge pull request #832 from Vivek-04022001/patch-3 #341
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: build/deploy training.plone.org | |
on: | |
push: | |
branches: | |
- "main" | |
workflow_dispatch: | |
jobs: | |
build_deploy: | |
runs-on: ubuntu-latest | |
environment: | |
name: training.plone.org | |
url: https://training.plone.org | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -q -r requirements.txt -c constraints.txt | |
pip freeze | |
sudo snap install --edge vale | |
- name: Run Vale | |
run: | | |
git clone https://github.com/errata-ai/Microsoft.git | |
cp -r ./Microsoft/Microsoft ./styles | |
VALEFILES=$(find ./docs/ -type f -name "*.md" -print) | |
vale --no-exit $VALEFILES | |
# TODO Raise linkcheck barrier again. | |
# - name: Run linkcheck | |
# run: make linkcheck | |
- name: Prepare deploy | |
run: make deploy | |
- name: Deploy to server | |
id: deploy | |
uses: Pendect/[email protected] | |
env: | |
DEPLOY_KEY: ${{secrets.DEPLOY_KEY_TRAINING}} | |
with: | |
flags: "-avzr --delete" | |
options: "" | |
ssh_options: "-p ${{vars.DEPLOY_PORT_TRAINING}}" | |
src: "_build/html/" | |
dest: "${{vars.DEPLOY_USER_TRAINING}}@${{vars.DEPLOY_SERVER_TRAINING}}:${{vars.DEPLOY_PATH_TRAINING}}" | |
- name: Display status from deploy | |
run: echo "${{ steps.deploy.outputs.status }}" |