|
7 | 7 | build:
|
8 | 8 | runs-on: ubuntu-latest
|
9 | 9 | steps:
|
10 |
| - - uses: actions/setup-python@v5 |
11 |
| - - uses: actions/checkout@master |
12 |
| - with: |
13 |
| - fetch-depth: 0 # otherwise, you will failed to push refs to dest repo |
14 |
| - - name: Install Dependencies |
15 |
| - run: | |
16 |
| - python -m pip install --upgrade pip |
17 |
| - pip install poetry |
18 |
| - poetry config virtualenvs.create false |
19 |
| - poetry install |
20 |
| - - name: Build and Commit |
21 |
| - uses: sphinx-notes/pages@v3 |
22 |
| - - name: Push changes |
23 |
| - uses: ad-m/github-push-action@master |
24 |
| - with: |
25 |
| - github_token: ${{ secrets.GITHUB_TOKEN }} |
26 |
| - branch: gh-pages |
| 10 | + - name: Clone Repository |
| 11 | + uses: actions/checkout@v4 |
| 12 | + with: |
| 13 | + fetch-depth: 0 # otherwise, you will failed to push refs to dest repo |
| 14 | + |
| 15 | + - name: Set up Python |
| 16 | + uses: actions/setup-python@v5 |
| 17 | + with: |
| 18 | + python-version: '3.11' |
| 19 | + |
| 20 | + - name: Install poetry |
| 21 | + uses: abatilo/actions-poetry@v2 |
| 22 | + |
| 23 | + - name: Setup a local virtual environment (if no poetry.toml file) |
| 24 | + run: | |
| 25 | + poetry config virtualenvs.create true --local |
| 26 | + poetry config virtualenvs.in-project true --local |
| 27 | + - uses: actions/cache@v3 |
| 28 | + name: Define a cache for the virtual environment based on the dependencies lock file |
| 29 | + with: |
| 30 | + path: ./.venv |
| 31 | + key: venv-${{ hashFiles('poetry.lock') }} |
| 32 | + |
| 33 | + - name: Install Dependencies |
| 34 | + run: poetry install |
| 35 | + - name: Build and Commit |
| 36 | + uses: sphinx-notes/pages@v3 |
| 37 | + - name: Push changes |
| 38 | + uses: ad-m/github-push-action@master |
| 39 | + with: |
| 40 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 41 | + branch: gh-pages |
0 commit comments