|
1 |
| -name: Build and deploy Plone 6 documentation to 6.dev-docs.plone.org |
| 1 | +name: Build and deploy Plone 6 documentation to 6.docs.plone.org |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | push:
|
5 | 5 | branches:
|
6 |
| - - "6-dev" |
| 6 | + - "6.0" |
| 7 | + |
| 8 | +env: |
| 9 | + node-version: 20.x |
7 | 10 |
|
8 | 11 | jobs:
|
9 | 12 | build_deploy:
|
10 | 13 | runs-on: ubuntu-latest
|
| 14 | + environment: |
| 15 | + name: docs.plone.org |
| 16 | + url: https://docs.plone.org |
11 | 17 | steps:
|
12 |
| - - uses: actions/checkout@v1 |
13 |
| - |
14 |
| - - name: Set up Python ${{ matrix.python-version }} |
15 |
| - uses: actions/setup-python@v2 |
| 18 | + - uses: actions/checkout@v4 |
| 19 | + - name: Setup Graphviz |
| 20 | + uses: ts-graphviz/setup-graphviz@v2 |
| 21 | + - name: Set up Python 3.12 |
| 22 | + uses: actions/setup-python@v5 |
16 | 23 | with:
|
17 |
| - python-version: "3.10" |
18 |
| - |
| 24 | + python-version: '3.12' |
| 25 | + cache: 'pip' |
19 | 26 | - name: Install dependencies
|
20 | 27 | run: |
|
21 |
| - python -m pip install --upgrade pip |
| 28 | + pip install -q -r requirements-initial.txt |
22 | 29 | pip install -q -r requirements.txt
|
| 30 | + pip freeze |
23 | 31 |
|
24 |
| - # - name: Run spellcheck |
25 |
| - # run: make spellcheck |
| 32 | + # - name: Run Vale |
| 33 | + # run: make vale |
26 | 34 |
|
27 | 35 | # - name: Run linkcheck
|
28 | 36 | # run: make linkcheck
|
29 | 37 |
|
30 | 38 | - name: Prepare deploy
|
31 | 39 | run: make deploy
|
32 | 40 |
|
33 |
| - # node setup |
34 |
| - - name: Use Node.js ${{ matrix.node-version }} |
35 |
| - uses: actions/setup-node@v1 |
| 41 | + - name: Use Node.js ${{ env.node-version }} |
| 42 | + uses: actions/setup-node@v4 |
36 | 43 | with:
|
37 |
| - node-version: ${{ matrix.node-version }} |
| 44 | + node-version: ${{ env.node-version }} |
38 | 45 |
|
39 |
| - # node cache |
40 |
| - - name: Get yarn cache directory path |
41 |
| - id: yarn-cache-dir-path |
42 |
| - working-directory: submodules/volto |
43 |
| - run: echo "::set-output name=dir::$(yarn cache dir)" |
44 |
| - - uses: actions/cache@v1 |
45 |
| - id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) |
| 46 | + - uses: pnpm/action-setup@v3 |
| 47 | + name: Install pnpm |
46 | 48 | with:
|
47 |
| - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} |
48 |
| - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
49 |
| - restore-keys: | |
50 |
| - ${{ runner.os }}-yarn- |
| 49 | + version: 8 |
| 50 | + run_install: false |
51 | 51 |
|
| 52 | + - name: Get pnpm store directory |
| 53 | + shell: bash |
| 54 | + run: | |
| 55 | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV |
| 56 | +
|
| 57 | + - uses: actions/cache@v3 |
| 58 | + name: Setup pnpm cache |
| 59 | + with: |
| 60 | + path: ${{ env.STORE_PATH }} |
| 61 | + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} |
| 62 | + restore-keys: | |
| 63 | + ${{ runner.os }}-pnpm-store- |
52 | 64 |
|
53 | 65 | - name: StoryBook build
|
54 |
| - run: cd submodules/volto && yarn && yarn build-storybook -o ../../_build/html/storybook |
| 66 | + run: make storybook |
55 | 67 |
|
56 | 68 | - name: Deploy to server
|
57 | 69 | id: deploy
|
58 |
| - uses: Pendect/action-rsyncer@v1.1.0 |
| 70 | + uses: Pendect/action-rsyncer@v2.0.0 |
59 | 71 | env:
|
60 | 72 | DEPLOY_KEY: ${{secrets.DEPLOY_KEY_DOCS}}
|
61 | 73 | with:
|
62 | 74 | flags: '-avzr --delete'
|
63 | 75 | options: ''
|
64 |
| - ssh_options: '-p ${{secrets.DEPLOY_PORT}}' |
| 76 | + ssh_options: '-p ${{vars.DEPLOY_PORT}}' |
65 | 77 | src: '_build/html/'
|
66 |
| - dest: '${{secrets.DEPLOY_USER_DOCS}}@${{secrets.DEPLOY_SERVER_DOCS}}:${{secrets.DEPLOY_PATH_DOCS}}' |
| 78 | + dest: '${{vars.DEPLOY_USER_DOCS}}@${{vars.DEPLOY_SERVER_DOCS}}:${{vars.DEPLOY_PATH_DOCS}}' |
67 | 79 |
|
68 | 80 | - name: Display status from deploy
|
69 | 81 | run: echo "${{ steps.deploy.outputs.status }}"
|
0 commit comments