From 55b1f2a58220ff14f0b34a0b534bd03270e50545 Mon Sep 17 00:00:00 2001 From: Alina Sireneva Date: Mon, 30 Oct 2023 17:08:52 +0300 Subject: [PATCH] ci: deploy directly to pages --- .github/workflows/docs.yaml | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 2f585f17..2da9c592 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -6,8 +6,17 @@ on: - master workflow_dispatch: +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false + jobs: - build-docs: + build: runs-on: ubuntu-latest steps: - name: Checkout repository @@ -20,6 +29,8 @@ jobs: uses: pnpm/action-setup@v2 with: version: 8 + - name: Setup Pages + uses: actions/configure-pages@v3 - run: pnpm install --frozen-lockfile - name: 'TL codegen' run: pnpm -C packages/tl run gen-code @@ -30,9 +41,20 @@ jobs: pnpm run docs touch docs/.nojekyll echo "ref.mtcute.dev" > docs/CNAME - - name: Deploy - uses: JamesIves/github-pages-deploy-action@v4.4.1 + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 with: - branch: gh-pages - single-commit: true - folder: docs + path: docs + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + needs: build + runs-on: ubuntu-latest + name: Deploy + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2