Skip to content

Commit

Permalink
update docs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
celsiusnarhwal committed Nov 26, 2024
1 parent 499b81a commit 9e052f9
Showing 1 changed file with 9 additions and 31 deletions.
40 changes: 9 additions & 31 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,13 @@ jobs:
environment: main
runs-on: ubuntu-latest
steps:
- name: Mask Secrets
run: echo "::add-mask::${{ secrets.FONTAWESOME_PKG_TOKEN }}"

- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set Up Python
uses: actions/setup-python@v5
with:
python-version: 3.11.1
python-version: 3.12.6

- name: Set Up Poetry
run: pipx install poetry==1.8.2
Expand All @@ -39,36 +36,17 @@ jobs:
${{ runner.os }}-poetry-
- name: Install Dependencies
run: poetry install --only main,docs && poetry run icl install
run: poetry install --only main,docs
env:
POETRY_REPOSITORIES_MATERIAL_INSIDERS_URL: https://github.com/squidfunk/mkdocs-material-insiders
POETRY_HTTP_BASIC_MATERIAL_INSIDERS_USERNAME: celsiusnarhwal
POETRY_HTTP_BASIC_MATERIAL_INSIDERS_PASSWORD: ${{ secrets.GH_PAT }}
FONTAWESOME_PKG_TOKEN: ${{ secrets.FONTAWESOME_PKG_TOKEN }}

- name: Build Documentation
run: poetry run mkdocs build

- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: site
path: site

deploy:
name: Deploy Documentation
environment: main
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: site
path: site

- name: Deploy to Vercel
run: npx vercel --yes --cwd site --token ${{ secrets.VERCEL_TOKEN }} ${{ github.ref_name == 'main' && '--prod' || '' }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
uses: celsiusnarhwal/mkdocs-vercel-deploy@main
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
production-branch: main

0 comments on commit 9e052f9

Please sign in to comment.