This repository has been archived by the owner on Mar 25, 2024. It is now read-only.
deploy #2715
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: deploy | |
on: | |
schedule: | |
- cron: '0 */12 * * *' | |
pull_request: | |
push: | |
branches: | |
- main | |
merge_group: | |
workflow_dispatch: | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- uses: actions/cache@v2 | |
with: | |
key: ${{ github.ref }} | |
path: .cache | |
- name: Install project dependencies | |
run: | | |
pip install poetry | |
poetry install | |
pip install git+https://github.com/ublue-os/image-scanner-md.git#egg=ublue-scanner | |
env: | |
POETRY_VIRTUALENVS_CREATE: false | |
- name: Install Insiders | |
if: ${{ github.ref_name == 'main' }} | |
run: pip install git+https://${{ secrets.INSIDERS_PAT }}@github.com/ublue-os/mkdocs-material-insiders.git | |
- name: Build image list | |
if: ${{ github.ref_name == 'main' }} | |
run: ublue-scan --org ublue-os --config .github/ublue-scan.yml --output badge > docs/_generated_image_list.md | |
env: | |
GITHUB_TOKEN: ${{ secrets.READ_PACKAGES_TOKEN }} | |
- name: Build MkDocs | |
if: ${{ github.ref_name == 'main' }} | |
run: mkdocs build -f mkdocs.insiders.yml | |
- name: Build MkDocs | |
if: ${{ github.ref_name != 'main' }} | |
run: mkdocs build --strict | |
- name: Upload site artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: ./site | |
deploy: | |
if: github.ref_name == 'main' | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |