Skip to content

Commit 6ac2816

Browse files
committed
Create doc-deploy.yml
1 parent f86fbb4 commit 6ac2816

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

.github/workflows/doc-deploy.yml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Deploy Adonis Attachment site to Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
env:
9+
success:
10+
failure: 🔴
11+
cancelled:
12+
skipped:
13+
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
concurrency:
20+
group: pages
21+
cancel-in-progress: false
22+
23+
jobs:
24+
build:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0
31+
- name: Setup Node
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: 20
35+
cache: npm
36+
- name: Setup Pages
37+
uses: actions/configure-pages@v4
38+
- name: Install dependencies
39+
run: npm ci
40+
- name: Build with VitePress
41+
run: npm run docs:build
42+
- name: Upload artifact
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: docs/.vitepress/dist
46+
47+
# Deployment job
48+
deploy:
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
needs: build
53+
runs-on: ubuntu-latest
54+
name: Deploy
55+
steps:
56+
- name: Deploy to GitHub Pages
57+
id: deployment
58+
uses: actions/deploy-pages@v4
59+
60+
- name: Notification
61+
if: ${{ always() }}
62+
uses: appleboy/telegram-action@master
63+
with:
64+
token: ${{ secrets.BOT_TOKEN }}
65+
to: ${{ secrets.CHAT_ID }}
66+
message: |
67+
Repository: ${{ github.repository }}
68+
Doc publish : ${{ env[job.status] }}

0 commit comments

Comments
 (0)