ci: deploy directly to pages
This commit is contained in:
parent
220b564d52
commit
55b1f2a582
1 changed files with 28 additions and 6 deletions
34
.github/workflows/docs.yaml
vendored
34
.github/workflows/docs.yaml
vendored
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue