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
|
- master
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: pages
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-docs:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
|
@ -20,6 +29,8 @@ jobs:
|
||||||
uses: pnpm/action-setup@v2
|
uses: pnpm/action-setup@v2
|
||||||
with:
|
with:
|
||||||
version: 8
|
version: 8
|
||||||
|
- name: Setup Pages
|
||||||
|
uses: actions/configure-pages@v3
|
||||||
- run: pnpm install --frozen-lockfile
|
- run: pnpm install --frozen-lockfile
|
||||||
- name: 'TL codegen'
|
- name: 'TL codegen'
|
||||||
run: pnpm -C packages/tl run gen-code
|
run: pnpm -C packages/tl run gen-code
|
||||||
|
@ -30,9 +41,20 @@ jobs:
|
||||||
pnpm run docs
|
pnpm run docs
|
||||||
touch docs/.nojekyll
|
touch docs/.nojekyll
|
||||||
echo "ref.mtcute.dev" > docs/CNAME
|
echo "ref.mtcute.dev" > docs/CNAME
|
||||||
- name: Deploy
|
- name: Upload artifact
|
||||||
uses: JamesIves/github-pages-deploy-action@v4.4.1
|
uses: actions/upload-pages-artifact@v2
|
||||||
with:
|
with:
|
||||||
branch: gh-pages
|
path: docs
|
||||||
single-commit: true
|
|
||||||
folder: 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