Merge pull request #56 from mstorsjo/amend-v12 #111
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: github pages | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches-ignore: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python (pip) | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
architecture: 'x64' | |
cache: 'pip' | |
cache-dependency-path: .github/workflows/main.yml | |
- name: Install codespell and poetry | |
run: python3 -m pip install --upgrade codespell poetry==1.6.1 | |
- name: Find typos with codespell | |
run: codespell --ignore-words-list=seh | |
- name: Setup Python (poetry) | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
architecture: 'x64' | |
cache: 'poetry' | |
- name: Install dependencies | |
run: poetry install | |
- run: poetry run mkdocs build | |
- name: Upload Results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: website | |
path: ./site | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
concurrency: ci-${{ github.ref }} | |
permissions: | |
contents: write | |
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/source' | |
steps: | |
- name: Download Results | |
uses: actions/download-artifact@v3 | |
with: | |
name: website | |
path: ./site | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./site | |
publish_branch: main | |
cname: www.mingw-w64.org |