Merge pull request #338 from pythonclub/copilot/update-github-actions… #10
This file contains hidden or 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: GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - pelican | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout do repositório | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: Instala dependências de compilação | |
| uses: awalsh128/cache-apt-pkgs-action@latest | |
| with: | |
| packages: make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev | |
| version: 1.0 | |
| - name: Cache pyenv versions | |
| uses: actions/cache@v4 | |
| with: | |
| path: $HOME/.pyenv/versions | |
| key: ${{ runner.os }}-pyenv-3.5.10 | |
| restore-keys: | | |
| ${{ runner.os }}-pyenv- | |
| - name: Instala pyenv e Python 3.5.10 | |
| run: | | |
| curl https://pyenv.run | bash | |
| export PYENV_ROOT="$HOME/.pyenv" | |
| export PATH="$PYENV_ROOT/bin:$PATH" | |
| eval "$(pyenv init -)" | |
| pyenv install -s 3.5.10 | |
| pyenv global 3.5.10 | |
| python --version | |
| python -m pip install --upgrade pip setuptools wheel | |
| - name: Instala dependências | |
| run: pip install -r requirements.txt | |
| - name: Build do site | |
| run: make publish | |
| - name: Upload do site | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: output/ | |
| deploy: | |
| name: Deploy | |
| needs: build | |
| permissions: | |
| pages: write | |
| id-token: write | |
| runs-on: ubuntu-22.04 | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy no GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |