Enable automatic dark mode #531
Workflow file for this run
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-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python (pip) | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
architecture: 'x64' | |
cache: 'pip' | |
cache-dependency-path: .github/workflows/main.yml | |
- name: Install poetry | |
run: | | |
python3 -m pip install --upgrade poetry==1.6.1 | |
- name: Setup Python (poetry) | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
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-22.04 | |
needs: build | |
concurrency: ci-${{ github.ref }} | |
permissions: | |
contents: write | |
if: github.repository != 'msys2/msys2.github.io' || (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.msys2.org |