diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9231019..63c860d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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 @@ -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